/*! For license information please see 4484366cfb3987dc.vendor.js.LICENSE.txt */ (self.webpackChunk_canva_web=self.webpackChunk_canva_web||[]).push([[5436],{632648:(t,e)=>{"use strict";Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});class n extends Error{}class r extends n{}class i extends n{}class o extends n{}class a extends n{}class s extends n{}class u extends n{}class c extends n{constructor(t){super(`unhandled case: ${JSON.stringify(t)}`)}}let l=0;function f(){return l++}function h(t){return null!=t}function d(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Float32Array}function p(t){switch(t){case"i8":return 5120;case"u8":return 5121;case"i16":return 5122;case"u16":return 5123;case"i32":return 5124;case"u32":return 5125;case"f32":return 5126;default:throw new c(t)}}const g={FLOAT:{type:"float",name:"float",length:1},VEC2:{type:"float",name:"vec2",length:2},VEC3:{type:"float",name:"vec3",length:3},VEC4:{type:"float",name:"vec4",length:4}},m={MAT2:{type:"matrix",name:"mat2",length:4},MAT3:{type:"matrix",name:"mat3",length:9},MAT4:{type:"matrix",name:"mat4",length:16}},y={INT:{type:"int",name:"int",length:1},IVEC2:{type:"int",name:"ivec2",length:2},IVEC3:{type:"int",name:"ivec3",length:3},IVEC4:{type:"int",name:"ivec4",length:4},SAMPLER2D:{type:"int",name:"sampler2D",length:1}},v=new Map([[5126,g.FLOAT],[35664,g.VEC2],[35665,g.VEC3],[35666,g.VEC4],[35674,m.MAT2],[35675,m.MAT3],[35676,m.MAT4],[5124,y.INT],[35667,y.IVEC2],[35668,y.IVEC3],[35669,y.IVEC4],[35678,y.SAMPLER2D]]);class b{constructor(t){var e;this.id=f(),this.source=t,t instanceof ArrayBuffer?this.dataType="f32":(e=t,"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?this.dataType="f32":this.dataType=function(t){if(t instanceof Float32Array)return"f32";if(t instanceof Uint8Array)return"u8";if(t instanceof Int32Array)return"i32";if(t instanceof Uint32Array)return"u32";if(t instanceof Uint8ClampedArray)return"u8";if(t instanceof Int8Array)return"i8";if(t instanceof Int16Array)return"i16";if(t instanceof Uint16Array)return"u16";throw new c(t)}(t)),this.length=t.byteLength/function(t){switch(t){case"i8":case"u8":return 1;case"i16":case"u16":return 2;case"i32":case"u32":case"f32":return 4;default:throw new c(t)}}(this.dataType)}}class w extends b{constructor(){super(...arguments),this.resourceType="buffer"}}class E extends b{constructor(){super(...arguments),this.resourceType="elements"}}const T={points:0,lines:1,"line loop":2,"line strip":3,triangles:4,"triangle strip":5,"triangle fan":6},x={zero:0,one:1,"src color":768,"one minus src color":769,"dst color":774,"one minus dst color":775,"src alpha":770,"one minus src alpha":771,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},A={front:1028,back:1029,"front and back":1032},S={cw:2304,ccw:2305},_={add:32774,subtract:32778,"reverse subtract":32779},O={source:"one",destination:"zero",equation:"add"};const R={never:512,less:513,equal:514,lequal:515,greater:516,notequal:517,gequal:518,always:519};class C{constructor({primitive:t="triangles",shader:e,attributes:n,indices:r,count:i=0,instances:o,uniforms:a={},textures:s={},blend:u,depthTest:c,cullFace:l,frontFace:f,renderTarget:h}){var p;this.primitive=T[t],this.shader=e,this.attributes=function(t){const e=Object.create(null);for(const[n,r]of Object.entries(t)){let t;t="buffer"in r&&!d(r)?{...r,buffer:k(r.buffer)}:{buffer:k(r)},e[n]=t}return e}(n),this.indices=r?(p=r,Array.isArray(p)&&(p=new Uint16Array(p)),d(p)&&(p=new E(p)),p):void 0,this.count=i,this.instances=o,this.uniforms=a,this.textures=s,this._cullFace=l?A[l]:void 0,this._frontFace=f?S[f]:2305,this.blend=u?function(t){var e,n;const r={...O,...null!=(e=t.rgb)?e:t},i={...O,...null!=(n=t.alpha)?n:t};return{rgb:{source:x[r.source],destination:x[r.destination],equation:_[r.equation]},alpha:{source:x[i.source],destination:x[i.destination],equation:_[i.equation]}}}(u):void 0,this.depthTest=c?function(t){var e,n;return{mask:null==(e=t.mask)||e,func:R[null!=(n=t.func)?n:"less"],range:{near:0,far:1,...t.range}}}(c):void 0,this.renderTarget=h}get cullFace(){return this._cullFace}set cullFace(t){this._cullFace=void 0!==t?A[t]:void 0}get frontFace(){return this._frontFace}set frontFace(t){t in S&&(this._frontFace=S[t])}get resources(){return[this.shader,...Object.values(this.attributes).map((t=>t.buffer)),...Object.values(this.textures),this.indices,this.renderTarget].filter(h)}}function k(t){return Array.isArray(t)&&(t=new Float32Array(t)),d(t)&&(t=new w(t)),t}class N{constructor(t){this.id=f(),this.resourceType="shader",this.vertexSource=t.vertexSource,this.fragmentSource=t.fragmentSource}}const I="preserve",P="fixed";class L{constructor(t){this.id=f(),this.resourceType="texture",this.textureType="render",this.source=null,this.name=t.name,this.alpha=t.alpha||I,this.size=t.size||P,this.width=t.width||("fixed"===this.size?0:1),this.height=t.height||("fixed"===this.size?0:1),this.colorFormat=t.colorFormat,this.numberFormat=t.numberFormat}}function M(t,e){return{width:"fixed"===t.size?t.width||e.width:(t.width||1)*e.width,height:"fixed"===t.size?t.height||e.height:(t.height||1)*e.height}}function j(t,e){if("u32"===e.dataType&&!t.getExtension("OES_element_index_uint"))throw new a("UNSIGNED_INT indices are not supported on this device.");const n=t.createBuffer(),r="buffer"===e.resourceType?t.ARRAY_BUFFER:t.ELEMENT_ARRAY_BUFFER;return t.bindBuffer(r,n),t.bufferData(r,e.source,t.STATIC_DRAW),t.bindBuffer(r,null),n}class D{constructor(t,e,n){this.name=t.name,this.length=t.size,this.location=e;const r=v.get(t.type);if(!r)throw new s(`Type of uniform '${t.name}' is not supported.`);this.meta=r,this._data=this.parseData(n)}parseData(t){if(!t)return new Array(this.meta.length).fill(0);const e=this.meta.length*this.length;if(t.flat().length!==e)throw new s(`Could not set uniform '${this.meta.type} ${this.name}'. Expected data with a length of ${e} but your data has a length of ${t.length}.`);return t}equals(t){const e=this._data,n=t;if(e.length!==n.length)return!1;for(let r=0;r10})(t)&&(n=function(t){return t.replace("precision mediump float;","precision highp float;")}(n));const o=t.createShader(e);if(!o)throw new i("Could not create shader");if(t.shaderSource(o,n),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS))return o;{const n=t.getShaderInfoLog(o);t.deleteShader(o);const i=e===t.VERTEX_SHADER?"vertex":"fragment";throw new r(`Could not compile ${i} shader. Details: ${n}`)}}function F(t,e){const n=function(t,e,n){const o=t.createProgram();if(!o)throw new i("Could not create program");const a=U(t,t.VERTEX_SHADER,e),s=U(t,t.FRAGMENT_SHADER,n);if(t.attachShader(o,a),t.attachShader(o,s),t.linkProgram(o),t.deleteShader(a),t.deleteShader(s),t.getProgramParameter(o,t.LINK_STATUS))return o;throw new r(`Could not link program. Details: ${t.getProgramInfoLog(o)}`)}(t,e.vertexSource,e.fragmentSource);t.useProgram(n);const o=t.getProgramParameter(n,t.ACTIVE_ATTRIBUTES),a=new Map;for(let r=0;r=2}return!0}class q{constructor(t){this.gl=t,this.maxAttribs=Number(t.getParameter(t.MAX_VERTEX_ATTRIBS)),this.shouldEnable=Array.from({length:this.maxAttribs}).fill(!1),this.hasEnabled=Array.from({length:this.maxAttribs}).fill(!1)}setEnabled(t,e){if(t<0)throw new Error(`Attribute index ${t} is out of bounds`);if(t>=this.maxAttribs)throw new Error(`Attribute index ${t} exceeds the maximum number of attributes supported by this device: ${this.maxAttribs}`);this.shouldEnable[t]=e}update(){for(let t=0;t{this.onContextLost&&this.onContextLost(new o("Error: WebGL context lost"))},this.env=(null==e?void 0:e.env)||window||{devicePixelRatio:1};const n=t.canvas;if(!n)throw new o("Unexpected canvas type: "+typeof n);this.onDispose=null==e?void 0:e.onDispose,this.canvas=n;const[r,i]=this.canvasSize;this.canvas.width=((null==e?void 0:e.width)||r)*this.env.devicePixelRatio,this.canvas.height=((null==e?void 0:e.height)||i)*this.env.devicePixelRatio,this.canvas.addEventListener("webglcontextlost",this.handleContextLost,{once:!0}),this.fbo=t.createFramebuffer(),this.vertexAttribArrayState=new q(t)}flush(){this.gl.flush()}resize(...t){let e,n;"undefined"!=typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?[e=this.canvas.clientWidth,n=this.canvas.clientHeight]=t:[e,n]=t,this.canvas.width=e*this.env.devicePixelRatio,this.canvas.height=n*this.env.devicePixelRatio}load(t){const e=this.gl,n=Array.isArray(t)?t:t.resources;for(const r of n)switch(r.resourceType){case"buffer":case"elements":this.bufferCache.has(r.id)||this.bufferCache.set(r.id,j(e,r));break;case"shader":this.shaderCache.has(r.id)||this.shaderCache.set(r.id,F(e,r));break;case"texture":this.textureCache.has(r.id)||this.textureCache.set(r.id,V(e,r));break;default:throw new c(r)}}update(t){const e=this.gl,n=Array.isArray(t)?t:t.resources;for(const r of n)if("texture"===r.resourceType){const t=this.textureCache.get(r.id);if(!t)throw new o(`Could not update texture with ID: '${r.id}'. Did you remember to use load()?`);this.textureCache.set(r.id,V(e,r,t))}}clear(t,e){var n;const r=this.gl;if(e){const t=null==(n=this.textureCache.get(e.id))?void 0:n.texture;if(!t)throw new o(`Could not find render target with ID: ${e.id}. Did you remember to use load()?`);r.bindFramebuffer(r.FRAMEBUFFER,this.fbo),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,t,0)}else r.bindFramebuffer(r.FRAMEBUFFER,null);const i=Array.isArray(t),a=i?t:t.color,s=i?1:t.depth,u=i?255:t.stencil,c=void 0!==a,l=void 0!==s,f=void 0!==u;c&&r.clearColor(...a),l&&r.clearDepth(s),f&&r.clearStencil(u);const h=(c?r.COLOR_BUFFER_BIT:0)|(l?r.DEPTH_BUFFER_BIT:0)|(f?r.STENCIL_BUFFER_BIT:0);r.clear(h)}render(t){var e,n,r,i,u,c,l;const f=this.gl,h=Array.isArray(t)?t:t.renderables;for(const d of h){const t=this.shaderCache.get(d.shader.id);if(!t)throw new o(`Could not find shader with ID: ${d.shader.id}. Did you remember to use load()?`);if(d.blend){const{rgb:t,alpha:e}=d.blend;f.enable(f.BLEND),f.blendFuncSeparate(t.source,t.destination,e.source,e.destination),f.blendEquationSeparate(t.equation,e.equation)}else f.disable(f.BLEND);if(d.depthTest){const{depthTest:t}=d;f.enable(f.DEPTH_TEST),f.depthMask(t.mask),f.depthFunc(t.func),f.depthRange(t.range.near,t.range.far)}else f.disable(f.DEPTH_TEST);if(d.cullFace?(f.enable(f.CULL_FACE),f.frontFace(d.frontFace),f.cullFace(d.cullFace)):f.disable(f.CULL_FACE),f.useProgram(t.program),d.indices){const t=this.getBuffer(d.indices);f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,t)}else f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,null);const h=d.instances?f.getExtension("ANGLE_instanced_arrays"):null;if(d.instances&&!h)throw new a("Instancing is required but not supported on this device");this.vertexAttribArrayState.reset();for(const[a,{location:s,meta:u}]of t.attributes.entries()){this.vertexAttribArrayState.setEnabled(s,!0);const t=d.attributes[a];if(!t)throw new o(`Could not locate shader attribute ${a} within Renderable's attributes.`);const c=p(null!=(e=t.type)?e:t.buffer.dataType),l=this.getBuffer(t.buffer);f.bindBuffer(f.ARRAY_BUFFER,l),f.vertexAttribPointer(s,u.length,c,null!=(n=t.normalized)&&n,null!=(r=t.stride)?r:0,null!=(i=t.offset)?i:0),d.instances&&t.divisor&&h.vertexAttribDivisorANGLE(s,t.divisor)}this.vertexAttribArrayState.update();const g={...d.uniforms,...this.commonUniforms};for(const[e,n]of t.uniforms.entries()){const t=g[e];if(!t)throw new s(`Could not find a value for uniform '${e}'. Make sure you provide a value.`);n.equals(t)||(n.data=t,B(f,n))}for(const[e,n]of t.textures.entries()){f.activeTexture(f.TEXTURE0+n.data.flat()[0]),f.bindTexture(f.TEXTURE_2D,null);const t=d.textures[e];if(!t)throw new s(`Could not find a texture associated with uniform '${e}'. Make sure you provide a value.`);const r=null==(u=this.textureCache.get(t.id))?void 0:u.texture;if(!r)throw new o(`Could not find texture with ID: ${t.id}. Did you remember to use load()?`);f.bindTexture(f.TEXTURE_2D,r)}if(d.renderTarget){const t=null==(c=this.textureCache.get(d.renderTarget.id))?void 0:c.texture;if(!t)throw new o(`Could not find render target with ID: ${d.renderTarget.id}. Did you remember to use load()?`);const{width:e,height:n}=H(f,d.renderTarget);f.bindFramebuffer(f.FRAMEBUFFER,this.fbo),f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,t,0),f.viewport(0,0,e,n)}else f.bindFramebuffer(f.FRAMEBUFFER,null),f.viewport(0,0,f.drawingBufferWidth,f.drawingBufferHeight);d.instances?d.indices?h.drawElementsInstancedANGLE(d.primitive,d.indices.length,p(d.indices.dataType),0,d.instances):h.drawArraysInstancedANGLE(d.primitive,0,d.count,d.instances):d.indices?f.drawElements(d.primitive,d.indices.length,p(d.indices.dataType),0):f.drawArrays(d.primitive,0,null!=(l=d.count)?l:0)}}release(t){const e=Array.isArray(t)?t:t.resources;for(const n of e)this.deleteResource(n.id,n.resourceType)}readPixels(t){var e;const n=this.gl;let r;if(t){const i=null==(e=this.textureCache.get(t.id))?void 0:e.texture;if(!i)throw new o(`Could not find render target with ID: ${t.id}. Did you remember to use load()?`);r=H(n,t),n.bindFramebuffer(n.FRAMEBUFFER,this.fbo),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,i,0)}else n.bindFramebuffer(n.FRAMEBUFFER,null),r={width:n.drawingBufferWidth,height:n.drawingBufferHeight};const i=new Uint8Array(r.width*r.height*4);return n.readPixels(0,0,r.width,r.height,n.RGBA,n.UNSIGNED_BYTE,i),new ImageData(new Uint8ClampedArray(i.buffer),r.width,r.height)}dispose(){var t;const e=this.gl;for(const r of this.bufferCache.keys())this.deleteResource(r,"buffer");for(const r of this.shaderCache.keys())this.deleteResource(r,"shader");for(const r of this.textureCache.keys())this.deleteResource(r,"texture");this.bufferCache.clear(),this.shaderCache.clear(),this.textureCache.clear(),e.deleteFramebuffer(this.fbo),e.bindBuffer(e.ARRAY_BUFFER,null),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null);const n=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);for(let r=0;r`void main() {${e}gl_FragColor.rgb *= gl_FragColor.a;\n}`))}function Z(t){return function(t){return Array.isArray(t)}(t)?t:[t]}function $(t,e,n,r){return new L({name:t,width:e,height:n,size:r||"relative",colorFormat:"rgba",numberFormat:"u8"})}class J{constructor(t){this.index=0,this.buffers=null!=t?t:[new L({colorFormat:"rgba",numberFormat:"u8"}),new L({colorFormat:"rgba",numberFormat:"u8"})]}currentBuffer(){return this.buffers[this.index]}nextBuffer(){return this.index=(this.index+1)%this.buffers.length,this.buffers[this.index]}}const Q=class t{static createPingpongBuffers({width:t,height:e,size:n}={}){return new J([$("A",t,e,n),$("B",t,e,n)])}constructor({passes:e,uniforms:n,textures:r,options:{buffers:i,renderTarget:o,enableOneTriangleOptimisation:a}={}}){this.enableOneTriangleOptimisation=null!=a?a:t.enableOneTriangleOptimisation,i=null!=i?i:t.createPingpongBuffers(o);const{passes:s,uniforms:u}=this.convertShorthands(e,n);this.uniforms=u;const c=s[s.length-1];this.finalPassShaderForCanvas=this.getShader(c,!0),this.finalPassShaderForRenderTexture=this.getShader(c,!1);const l=this.getRenderTextures(s,o);this.renderables=this.getRenderables(s,l,i,r,o)}convertShorthands(t,e){return{passes:t.map((t=>"string"==typeof t?{fragment:t}:t)),uniforms:Object.fromEntries(Object.entries(null!=e?e:{}).map((([t,e])=>[t,Z(e)])))}}getRenderTextures(t,e){const n=new Set;for(const i of t){if(i.inputs)for(const t of i.inputs)t!==K?n.add(t):console.warn(`Your render pass should not define ${K}. This will be automatically added.`);i.output&&n.add(i.output)}const r=new Map;for(const i of n)r.set(i,$(i,null==e?void 0:e.width,null==e?void 0:e.height,null==e?void 0:e.size));return r}getRenderables(t,e,n,r,i){const o=t.slice(0,-1).map((t=>{const i=this.getShader(t,!1),o=n.currentBuffer(),a=t.output?this.getRenderTexture(t.output,e):n.nextBuffer();return this.getRenderable(t,i,o,a,e,r)})),a=i?this.finalPassShaderForRenderTexture:this.finalPassShaderForCanvas;return[...o,this.getRenderable(t[t.length-1],a,n.currentBuffer(),i,e,r)]}getRenderable(t,e,n,r,i,o){const a=this.uniforms,s=this.getTextures(t,{...o,[K]:n},i),u=this.enableOneTriangleOptimisation?W:X;return new C({...u,shader:e,uniforms:a,textures:s,renderTarget:r})}getShader(t,e){const n=`\nattribute vec2 aPosition;\nvarying vec2 vTexCoord;\n\nvoid main()\n{\n gl_Position = vec4(aPosition, 0.0, 1.0);\n vTexCoord = aPosition * 0.5 + 0.5;\n ${e?"vTexCoord.y = 1.0 - vTexCoord.y;":""}\n}\n `,r=this.getFragmentSource(t.fragment,e);return new N({vertexSource:n,fragmentSource:r})}getFragmentSource(t,e){return e?Y(t):t}getRenderTexture(t,e){const n=e.get(t);if(!n)throw new s(`Unable to assign texture. Could not find texture '${t}'.`);return n}getTextures(t,e,n){if(t.inputs)for(const r of t.inputs)e[r]=this.getRenderTexture(r,n);return e}update({textures:t,uniforms:e,renderTarget:n}){if(t)for(const[r,i]of Object.entries(t))if(i)for(const t of this.renderables)t.textures[r]=i;if(e)for(const[r,i]of Object.entries(e))this.uniforms[r]&&(this.uniforms[r]=Z(i));if(void 0!==n){const t=this.renderables[this.renderables.length-1],e=null===n?this.finalPassShaderForCanvas:this.finalPassShaderForRenderTexture;t.renderTarget=null!=n?n:void 0,t.shader=e}}get resources(){return[...new Set([...this.renderables.flatMap((t=>t.resources)),this.finalPassShaderForCanvas,this.finalPassShaderForRenderTexture])]}};Q.enableOneTriangleOptimisation=!1;let tt,et,nt=Q;function rt(t,e){if(!(tt&&et||(tt=document.createElement("canvas"),et=tt.getContext("2d"),et)))throw new n("Unable to establish `CanvasRenderingContext2D` for debugging");return tt.width=t,tt.height=e,{canvas:tt,context:et}}function it(t,e){const n=t.readPixels(e),{width:r,height:i}=n,{canvas:o,context:a}=rt(r,i);a.putImageData(n,0,0);const s=o.toDataURL();st(null!=e?e:t.canvas,s,r/i)}function ot(t){const{width:e,height:n}=t,{canvas:r,context:i}=rt(e,n);t.source instanceof ImageData?i.putImageData(t.source,0,0):i.drawImage(t.source,0,0);st(t,r.toDataURL(),e/n)}function at(t){const{source:e,colorFormat:n,width:r,height:i}=t,{canvas:o,context:a}=rt(r,i),s="rgba"===n,u=a.createImageData(r,i),c=u.data;for(let l=0,f=0;l\n \n \n \n \n ')}');\n background-position: center, 0 0;\n background-size: contain, 20px 20px;\n background-repeat: no-repeat, repeat;\n `;console.group("Debugging",t),console.log("%c ",r),console.groupEnd()}e.AdditiveBlending={source:"src alpha",destination:"one",equation:"add"},e.BinaryTexture=class{constructor(t){this.id=f(),this.resourceType="texture",this.textureType="binary",this.size=P,this.source=t.source,this.name=t.name,this.alpha=t.alpha||I,this.width=t.width,this.height=t.height}get colorFormat(){const t=this.source.length/(this.width*this.height);if(3===t)return"rgb";if(4===t)return"rgba";throw new s(`Invalid number of color channels for binary texture with ID: ${this.id}. Number of channels must be 3 (RGB) or 4 (RGBA) but the provided data has ${t} channels.`)}get numberFormat(){return this.source instanceof Uint8Array?"u8":"f32"}},e.Buffer=w,e.Effect=nt,e.ElementsBuffer=E,e.FraglAllocationError=i,e.FraglCompilationError=r,e.FraglError=n,e.FraglInternalError=u,e.FraglPlatformError=a,e.FraglRuntimeError=o,e.FraglValidationError=s,e.ImageTexture=class{constructor(t){this.id=f(),this.resourceType="texture",this.textureType="image",this.size=P,this.colorFormat="rgba",this.numberFormat="u8",this.source=t.source,this.name=t.name,this.alpha=t.alpha||I}get width(){return this.source.width}get height(){return this.source.height}},e.MockWebGLRenderingContext=class{constructor(t){this.canvas=t,this.drawingBufferColorSpace="srgb",this.DEPTH_BUFFER_BIT=256,this.STENCIL_BUFFER_BIT=1024,this.COLOR_BUFFER_BIT=16384,this.POINTS=0,this.LINES=1,this.LINE_LOOP=2,this.LINE_STRIP=3,this.TRIANGLES=4,this.TRIANGLE_STRIP=5,this.TRIANGLE_FAN=6,this.ZERO=0,this.ONE=1,this.SRC_COLOR=768,this.ONE_MINUS_SRC_COLOR=769,this.SRC_ALPHA=770,this.ONE_MINUS_SRC_ALPHA=771,this.DST_ALPHA=772,this.ONE_MINUS_DST_ALPHA=773,this.DST_COLOR=774,this.ONE_MINUS_DST_COLOR=775,this.SRC_ALPHA_SATURATE=776,this.FUNC_ADD=32774,this.BLEND_EQUATION=32777,this.BLEND_EQUATION_RGB=32777,this.BLEND_EQUATION_ALPHA=34877,this.FUNC_SUBTRACT=32778,this.FUNC_REVERSE_SUBTRACT=32779,this.BLEND_DST_RGB=32968,this.BLEND_SRC_RGB=32969,this.BLEND_DST_ALPHA=32970,this.BLEND_SRC_ALPHA=32971,this.CONSTANT_COLOR=32769,this.ONE_MINUS_CONSTANT_COLOR=32770,this.CONSTANT_ALPHA=32771,this.ONE_MINUS_CONSTANT_ALPHA=32772,this.BLEND_COLOR=32773,this.ARRAY_BUFFER=34962,this.ELEMENT_ARRAY_BUFFER=34963,this.ARRAY_BUFFER_BINDING=34964,this.ELEMENT_ARRAY_BUFFER_BINDING=34965,this.STREAM_DRAW=35040,this.STATIC_DRAW=35044,this.DYNAMIC_DRAW=35048,this.BUFFER_SIZE=34660,this.BUFFER_USAGE=34661,this.CURRENT_VERTEX_ATTRIB=34342,this.FRONT=1028,this.BACK=1029,this.FRONT_AND_BACK=1032,this.CULL_FACE=2884,this.BLEND=3042,this.DITHER=3024,this.STENCIL_TEST=2960,this.DEPTH_TEST=2929,this.SCISSOR_TEST=3089,this.POLYGON_OFFSET_FILL=32823,this.SAMPLE_ALPHA_TO_COVERAGE=32926,this.SAMPLE_COVERAGE=32928,this.NO_ERROR=0,this.INVALID_ENUM=1280,this.INVALID_VALUE=1281,this.INVALID_OPERATION=1282,this.OUT_OF_MEMORY=1285,this.CW=2304,this.CCW=2305,this.LINE_WIDTH=2849,this.ALIASED_POINT_SIZE_RANGE=33901,this.ALIASED_LINE_WIDTH_RANGE=33902,this.CULL_FACE_MODE=2885,this.FRONT_FACE=2886,this.DEPTH_RANGE=2928,this.DEPTH_WRITEMASK=2930,this.DEPTH_CLEAR_VALUE=2931,this.DEPTH_FUNC=2932,this.STENCIL_CLEAR_VALUE=2961,this.STENCIL_FUNC=2962,this.STENCIL_FAIL=2964,this.STENCIL_PASS_DEPTH_FAIL=2965,this.STENCIL_PASS_DEPTH_PASS=2966,this.STENCIL_REF=2967,this.STENCIL_VALUE_MASK=2963,this.STENCIL_WRITEMASK=2968,this.STENCIL_BACK_FUNC=34816,this.STENCIL_BACK_FAIL=34817,this.STENCIL_BACK_PASS_DEPTH_FAIL=34818,this.STENCIL_BACK_PASS_DEPTH_PASS=34819,this.STENCIL_BACK_REF=36003,this.STENCIL_BACK_VALUE_MASK=36004,this.STENCIL_BACK_WRITEMASK=36005,this.VIEWPORT=2978,this.SCISSOR_BOX=3088,this.COLOR_CLEAR_VALUE=3106,this.COLOR_WRITEMASK=3107,this.UNPACK_ALIGNMENT=3317,this.PACK_ALIGNMENT=3333,this.MAX_TEXTURE_SIZE=3379,this.MAX_VIEWPORT_DIMS=3386,this.SUBPIXEL_BITS=3408,this.RED_BITS=3410,this.GREEN_BITS=3411,this.BLUE_BITS=3412,this.ALPHA_BITS=3413,this.DEPTH_BITS=3414,this.STENCIL_BITS=3415,this.POLYGON_OFFSET_UNITS=10752,this.POLYGON_OFFSET_FACTOR=32824,this.TEXTURE_BINDING_2D=32873,this.SAMPLE_BUFFERS=32936,this.SAMPLES=32937,this.SAMPLE_COVERAGE_VALUE=32938,this.SAMPLE_COVERAGE_INVERT=32939,this.COMPRESSED_TEXTURE_FORMATS=34467,this.DONT_CARE=4352,this.FASTEST=4353,this.NICEST=4354,this.GENERATE_MIPMAP_HINT=33170,this.BYTE=5120,this.UNSIGNED_BYTE=5121,this.SHORT=5122,this.UNSIGNED_SHORT=5123,this.INT=5124,this.UNSIGNED_INT=5125,this.FLOAT=5126,this.DEPTH_COMPONENT=6402,this.ALPHA=6406,this.RGB=6407,this.RGBA=6408,this.LUMINANCE=6409,this.LUMINANCE_ALPHA=6410,this.UNSIGNED_SHORT_4_4_4_4=32819,this.UNSIGNED_SHORT_5_5_5_1=32820,this.UNSIGNED_SHORT_5_6_5=33635,this.FRAGMENT_SHADER=35632,this.VERTEX_SHADER=35633,this.MAX_VERTEX_ATTRIBS=34921,this.MAX_VERTEX_UNIFORM_VECTORS=36347,this.MAX_VARYING_VECTORS=36348,this.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661,this.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660,this.MAX_TEXTURE_IMAGE_UNITS=34930,this.MAX_FRAGMENT_UNIFORM_VECTORS=36349,this.SHADER_TYPE=35663,this.DELETE_STATUS=35712,this.LINK_STATUS=35714,this.VALIDATE_STATUS=35715,this.ATTACHED_SHADERS=35717,this.ACTIVE_UNIFORMS=35718,this.ACTIVE_ATTRIBUTES=35721,this.SHADING_LANGUAGE_VERSION=35724,this.CURRENT_PROGRAM=35725,this.NEVER=512,this.LESS=513,this.EQUAL=514,this.LEQUAL=515,this.GREATER=516,this.NOTEQUAL=517,this.GEQUAL=518,this.ALWAYS=519,this.KEEP=7680,this.REPLACE=7681,this.INCR=7682,this.DECR=7683,this.INVERT=5386,this.INCR_WRAP=34055,this.DECR_WRAP=34056,this.VENDOR=7936,this.RENDERER=7937,this.VERSION=7938,this.NEAREST=9728,this.LINEAR=9729,this.NEAREST_MIPMAP_NEAREST=9984,this.LINEAR_MIPMAP_NEAREST=9985,this.NEAREST_MIPMAP_LINEAR=9986,this.LINEAR_MIPMAP_LINEAR=9987,this.TEXTURE_MAG_FILTER=10240,this.TEXTURE_MIN_FILTER=10241,this.TEXTURE_WRAP_S=10242,this.TEXTURE_WRAP_T=10243,this.TEXTURE_2D=3553,this.TEXTURE=5890,this.TEXTURE_CUBE_MAP=34067,this.TEXTURE_BINDING_CUBE_MAP=34068,this.TEXTURE_CUBE_MAP_POSITIVE_X=34069,this.TEXTURE_CUBE_MAP_NEGATIVE_X=34070,this.TEXTURE_CUBE_MAP_POSITIVE_Y=34071,this.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072,this.TEXTURE_CUBE_MAP_POSITIVE_Z=34073,this.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074,this.MAX_CUBE_MAP_TEXTURE_SIZE=34076,this.TEXTURE0=33984,this.TEXTURE1=33985,this.TEXTURE2=33986,this.TEXTURE3=33987,this.TEXTURE4=33988,this.TEXTURE5=33989,this.TEXTURE6=33990,this.TEXTURE7=33991,this.TEXTURE8=33992,this.TEXTURE9=33993,this.TEXTURE10=33994,this.TEXTURE11=33995,this.TEXTURE12=33996,this.TEXTURE13=33997,this.TEXTURE14=33998,this.TEXTURE15=33999,this.TEXTURE16=34e3,this.TEXTURE17=34001,this.TEXTURE18=34002,this.TEXTURE19=34003,this.TEXTURE20=34004,this.TEXTURE21=34005,this.TEXTURE22=34006,this.TEXTURE23=34007,this.TEXTURE24=34008,this.TEXTURE25=34009,this.TEXTURE26=34010,this.TEXTURE27=34011,this.TEXTURE28=34012,this.TEXTURE29=34013,this.TEXTURE30=34014,this.TEXTURE31=34015,this.ACTIVE_TEXTURE=34016,this.REPEAT=10497,this.CLAMP_TO_EDGE=33071,this.MIRRORED_REPEAT=33648,this.FLOAT_VEC2=35664,this.FLOAT_VEC3=35665,this.FLOAT_VEC4=35666,this.INT_VEC2=35667,this.INT_VEC3=35668,this.INT_VEC4=35669,this.BOOL=35670,this.BOOL_VEC2=35671,this.BOOL_VEC3=35672,this.BOOL_VEC4=35673,this.FLOAT_MAT2=35674,this.FLOAT_MAT3=35675,this.FLOAT_MAT4=35676,this.SAMPLER_2D=35678,this.SAMPLER_CUBE=35680,this.VERTEX_ATTRIB_ARRAY_ENABLED=34338,this.VERTEX_ATTRIB_ARRAY_SIZE=34339,this.VERTEX_ATTRIB_ARRAY_STRIDE=34340,this.VERTEX_ATTRIB_ARRAY_TYPE=34341,this.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922,this.VERTEX_ATTRIB_ARRAY_POINTER=34373,this.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975,this.IMPLEMENTATION_COLOR_READ_TYPE=35738,this.IMPLEMENTATION_COLOR_READ_FORMAT=35739,this.COMPILE_STATUS=35713,this.LOW_FLOAT=36336,this.MEDIUM_FLOAT=36337,this.HIGH_FLOAT=36338,this.LOW_INT=36339,this.MEDIUM_INT=36340,this.HIGH_INT=36341,this.FRAMEBUFFER=36160,this.RENDERBUFFER=36161,this.RGBA4=32854,this.RGB5_A1=32855,this.RGBA8=32856,this.RGB565=36194,this.DEPTH_COMPONENT16=33189,this.STENCIL_INDEX8=36168,this.DEPTH_STENCIL=34041,this.RENDERBUFFER_WIDTH=36162,this.RENDERBUFFER_HEIGHT=36163,this.RENDERBUFFER_INTERNAL_FORMAT=36164,this.RENDERBUFFER_RED_SIZE=36176,this.RENDERBUFFER_GREEN_SIZE=36177,this.RENDERBUFFER_BLUE_SIZE=36178,this.RENDERBUFFER_ALPHA_SIZE=36179,this.RENDERBUFFER_DEPTH_SIZE=36180,this.RENDERBUFFER_STENCIL_SIZE=36181,this.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048,this.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049,this.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050,this.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051,this.COLOR_ATTACHMENT0=36064,this.DEPTH_ATTACHMENT=36096,this.STENCIL_ATTACHMENT=36128,this.DEPTH_STENCIL_ATTACHMENT=33306,this.NONE=0,this.FRAMEBUFFER_COMPLETE=36053,this.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054,this.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055,this.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057,this.FRAMEBUFFER_UNSUPPORTED=36061,this.FRAMEBUFFER_BINDING=36006,this.RENDERBUFFER_BINDING=36007,this.MAX_RENDERBUFFER_SIZE=34024,this.INVALID_FRAMEBUFFER_OPERATION=1286,this.UNPACK_FLIP_Y_WEBGL=37440,this.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441,this.CONTEXT_LOST_WEBGL=37442,this.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443,this.BROWSER_DEFAULT_WEBGL=37444}get drawingBufferWidth(){return this.canvas.width}get drawingBufferHeight(){return this.canvas.height}activeTexture(){}attachShader(){}bindAttribLocation(){}bindBuffer(){}bindFramebuffer(){}bindRenderbuffer(){}bindTexture(){}blendColor(){}blendEquation(){}blendEquationSeparate(){}blendFunc(){}blendFuncSeparate(){}bufferData(){}bufferSubData(){}checkFramebufferStatus(){return this.FRAMEBUFFER_COMPLETE}clear(){}clearColor(){}clearDepth(){}clearStencil(){}colorMask(){}compileShader(){}compressedTexImage2D(){}compressedTexSubImage2D(){}copyTexImage2D(){}copyTexSubImage2D(){}createBuffer(){return{}}createFramebuffer(){return{}}createProgram(){return{}}createRenderbuffer(){return{}}createShader(){return{}}createTexture(){return{}}cullFace(){}deleteBuffer(){}deleteFramebuffer(){}deleteProgram(){}deleteRenderbuffer(){}deleteShader(){}deleteTexture(){}depthFunc(){}depthMask(){}depthRange(){}detachShader(){}disable(){}disableVertexAttribArray(){}drawArrays(){}drawElements(){}enable(){}enableVertexAttribArray(){}finish(){}flush(){}framebufferRenderbuffer(){}framebufferTexture2D(){}frontFace(){}generateMipmap(){}getActiveAttrib(){return{}}getActiveUniform(){return null}getAttachedShaders(){return[]}getAttribLocation(){return 0}getBufferParameter(){return 0}getContextAttributes(){return{}}getError(){return this.NO_ERROR}getExtension(){return null}getFramebufferAttachmentParameter(){return 0}getParameter(){return 0}getProgramInfoLog(){return""}getProgramParameter(){return{}}getRenderbufferParameter(){return 0}getShaderInfoLog(){return""}getShaderParameter(){return!0}getShaderPrecisionFormat(){return{rangeMin:127,rangeMax:127,precision:127}}getShaderSource(){return""}getSupportedExtensions(){return[]}getTexParameter(){return 0}getUniform(){return 0}getUniformLocation(){return null}getVertexAttrib(){return 0}getVertexAttribOffset(){return 0}hint(){}isBuffer(){return!1}isContextLost(){return!1}isEnabled(){return!1}isFramebuffer(){return!1}isProgram(){return!1}isRenderbuffer(){return!1}isShader(){return!1}isTexture(){return!1}lineWidth(){}linkProgram(){}pixelStorei(){}polygonOffset(){}readPixels(){}renderbufferStorage(){}sampleCoverage(){}scissor(){}shaderSource(){}stencilFunc(){}stencilFuncSeparate(){}stencilMask(){}stencilMaskSeparate(){}stencilOp(){}stencilOpSeparate(){}texImage2D(){}texParameterf(){}texParameteri(){}texSubImage2D(){}uniform1f(){}uniform1fv(){}uniform1i(){}uniform1iv(){}uniform2f(){}uniform2fv(){}uniform2i(){}uniform2iv(){}uniform3f(){}uniform3fv(){}uniform3i(){}uniform3iv(){}uniform4f(){}uniform4fv(){}uniform4i(){}uniform4iv(){}uniformMatrix2fv(){}uniformMatrix3fv(){}uniformMatrix4fv(){}useProgram(){}validateProgram(){}vertexAttrib1f(){}vertexAttrib1fv(){}vertexAttrib2f(){}vertexAttrib2fv(){}vertexAttrib3f(){}vertexAttrib3fv(){}vertexAttrib4f(){}vertexAttrib4fv(){}vertexAttribPointer(){}viewport(){}},e.ModelViewer=class{constructor(){this.renderables=[]}get resources(){return this.renderables.flatMap((t=>t.resources))}},e.PingpongBuffers=J,e.PremultipliedNormalBlending={source:"one",destination:"one minus src alpha",equation:"add"},e.RenderTexture=L,e.Renderable=C,e.Renderer=class{constructor(t){this.resources=new Map,this.create=t,this.backend=this.createBackend()}createBackend(){const t=this.create();return t.onContextLost=t=>{var e;null==(e=this.onContextLost)||e.call(this,t)},t}load(t){this.backend.load(t);const e=Array.isArray(t)?t:t.resources;for(const n of e)this.resources.set(n.id,n)}update(t){this.backend.update(t)}clear(t,e){this.backend.clear(t,e)}render(t){this.backend.render(t)}readPixels(t){return this.backend.readPixels(t)}flush(){this.backend.flush()}release(t){this.backend.release(t);const e=Array.isArray(t)?t:t.resources;for(const n of e)this.resources.delete(n.id)}dispose(){this.backend.dispose(),this.resources.clear()}restore(){this.backend.dispose(),this.backend=this.createBackend(),this.backend.load(Array.from(this.resources.values()))}resize(...t){const[e,n]=t;if(e===this.canvas.width&&n===this.canvas.height)return;this.backend.resize(...t);const r=Array.from(this.resources.values()).filter((t=>"texture"===t.resourceType&&!t.source&&"relative"===t.size));this.backend.update(r)}get canvas(){return this.backend.canvas}},e.Shader=N,e.WebGlRenderer=z,e.createWebGlRenderer=function(t,e){var n,r,o;const a=document.createElement("canvas");t.append(a),a.style.width="100%",a.style.height="100%";let s="Unknown";const u=t=>{t.statusMessage&&(s=t.statusMessage)};a.addEventListener("webglcontextcreationerror",u);const c={alpha:null==(n=null==e?void 0:e.alpha)||n,antialias:null==(r=null==e?void 0:e.antialias)||r,depth:null!=(o=null==e?void 0:e.depth)&&o,stencil:!1,preserveDrawingBuffer:!(null==e||!e.preserveDrawingBuffer),powerPreference:"high-performance",failIfMajorPerformanceCaveat:!(null==e||!e.failIfMajorPerformanceCaveat)},l=null!=e&&e.useWebGl2?a.getContext("webgl2",c):a.getContext("webgl",c);if(a.removeEventListener("webglcontextcreationerror",u),!l)throw new i(`A WebGL context could not be created. Reason: ${s}`);return new z(l,{...e,onDispose:()=>{a.remove()}})},e.debugBinaryTexture=at,e.debugImageTexture=ot,e.debugRenderTexture=it,e.debugTexture=function(t,e){e&&"render"!==e.textureType?"image"===e.textureType?ot(e):at(e):it(t,e)},e.getAbsoluteTextureSize=M,e.injectAlphaPremultiplication=Y,e.paddedTuple=function(t,e,n){if(t.length>n)return t.slice(0,n);const r=[...t];for(;r.length{"use strict";t.exports=n(632648)},968:t=>{var e;window,e=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=85)}([function(t,e,n){"use strict";n.d(e,"c",(function(){return x})),n.d(e,"b",(function(){return S})),n.d(e,"d",(function(){return O})),n.d(e,"a",(function(){return A}));var r=n(1),i=n.n(r),o=n(10),a=n.n(o),s=n(17),u=n.n(s),c=n(2),l=n(5),f=n(3),h=n(9),d=n(6),p=n(25),g=n(11),m=n(20);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=S(e,r),this.container=this.options.container,null==this.container)return T.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var i=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",p.a.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new f.a;var o=this.options.registry.query(c.ScrollBlot.blotName);this.scroll=new o(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new l.a(this.scroll),this.selection=new d.b(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.init(),this.emitter.on(f.a.events.EDITOR_CHANGE,(function(t){t===f.a.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(f.a.events.SCROLL_UPDATE,(function(t,e,r){var i=n.selection.lastRange,o=b(n.selection.getRange(),1)[0],a=i&&o?{oldRange:i,newRange:o}:void 0;_.call(n,(function(){return n.editor.update(null,e,a)}),t),null!=r&&Object.entries(r).forEach((function(t){var e=b(t,2),r=e[0],i=e[1];return n.selection.format(r,i)}))}));var a=this.clipboard.convert({html:"".concat(i,"


"),text:"\n"});this.setContents(a),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}var e,n,r;return e=t,n=[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=b(O(t,e,n),4);return t=i[0],e=i[1],n=i[3],_.call(this,(function(){return r.editor.deleteText(t,e)}),n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"editReadOnly",value:function(t){this.allowReadOnlyEdits=!0;var e=t();return this.allowReadOnlyEdits=!1,e}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.a.sources.API;return _.call(this,(function(){var r=n.getSelection(!0),o=new i.a;if(null==r)return o;if(n.scroll.query(t,c.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,v({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,v({},t,e))}return n.setSelection(r,f.a.sources.SILENT),o}),r)}},{key:"formatLine",value:function(t,e,n,r,i){var o,a=this,s=b(O(t,e,n,r,i),4);return t=s[0],e=s[1],o=s[2],i=s[3],_.call(this,(function(){return a.editor.formatLine(t,e,o)}),i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var o,a=this,s=b(O(t,e,n,r,i),4);return t=s[0],e=s[1],o=s[2],i=s[3],_.call(this,(function(){return a.editor.formatText(t,e,o)}),i,t,0)}},{key:"getBounds",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(e="number"==typeof t?this.selection.getBounds(t,n):this.selection.getBounds(t.index,t.length)))return null;var r=this.container.getBoundingClientRect();return{bottom:e.bottom-r.top,height:e.height,left:e.left-r.left,right:e.right-r.left,top:e.top-r.top,width:e.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=b(O(t,e),2);return t=n[0],e=n[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getSemanticHTML",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=b(O(t,e),2);return t=n[0],e=n[1],this.editor.getHTML(t,e)}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=b(O(t,e),2);return t=n[0],e=n[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return _.call(this,(function(){return i.editor.insertEmbed(e,n,r)}),o,e)}},{key:"insertText",value:function(t,e,n,r,i){var o,a=this,s=b(O(t,0,n,r,i),4);return t=s[0],o=s[2],i=s[3],_.call(this,(function(){return a.editor.insertText(t,e,o)}),i,t,e.length)}},{key:"isEnabled",value:function(){return this.scroll.isEnabled()}},{key:"off",value:function(){var t;return(t=this.emitter).off.apply(t,arguments)}},{key:"on",value:function(){var t;return(t=this.emitter).on.apply(t,arguments)}},{key:"once",value:function(){var t;return(t=this.emitter).once.apply(t,arguments)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=b(O(t,e,n),4);return t=i[0],e=i[1],n=i[3],_.call(this,(function(){return r.editor.removeFormat(t,e)}),n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.a.sources.API;return _.call(this,(function(){t=new i.a(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),a=e.editor.deleteText(e.getLength()-1,1);return r.compose(o).compose(a)}),n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=b(O(e,n,r),4);e=i[0],n=i[1],r=i[3],this.selection.setRange(new d.a(Math.max(0,e),n),r),r!==f.a.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.a.sources.API,n=(new i.a).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.a.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.a.sources.API;return _.call(this,(function(){return t=new i.a(t),e.editor.applyDelta(t,n)}),n,!0)}}],r=[{key:"debug",value:function(t){!0===t&&(t="log"),g.a.level(t)}},{key:"find",value:function(t){return p.a.get(t)||x.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&T.error("Cannot import ".concat(t,". Are you sure it was registered?")),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var i=t.attrName||t.blotName;"string"==typeof i?this.register("formats/".concat(i),t,e):Object.keys(t).forEach((function(r){n.register(r,t[r],e)}))}else null==this.imports[t]||r||T.warn("Overwriting ".concat(t," with"),e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName&&x.register(e),"function"==typeof e.register&&e.register(x)}}],n&&E(e.prototype,n),r&&E(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function S(t,e){if((e=u()({container:t,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0}},e)).theme&&e.theme!==A.DEFAULTS.theme){if(e.theme=A.import("themes/".concat(e.theme)),null==e.theme)throw new Error("Invalid theme ".concat(e.theme,". Did you register it?"))}else e.theme=m.a;var n=a()(e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=A.import("modules/".concat(e));return null==n?T.error("Cannot load ".concat(e," module. Are you sure you registered it?")):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=u()({},A.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function _(t,e,n,r){if(!this.isEnabled()&&e===f.a.sources.USER&&!this.allowReadOnlyEdits)return new i.a;var o=null==n?null:this.getSelection(),a=this.editor.delta,s=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=R(o,s,e):0!==r&&(o=R(o,n,r,e)),this.setSelection(o,f.a.sources.SILENT)),s.length()>0){var u,c,l=[f.a.events.TEXT_CHANGE,s,a,e];(u=this.emitter).emit.apply(u,[f.a.events.EDITOR_CHANGE].concat(l)),e!==f.a.sources.SILENT&&(c=this.emitter).emit.apply(c,l)}return s}function O(t,e,n,r,i){var o={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=r,r=n,n=e,e=0),"object"===y(n)?(o=n,i=r):"string"==typeof n&&(null!=r?o[n]=r:i=n),[t,e,o,i=i||f.a.sources.API]}function R(t,e,n,r){if(null==t)return null;var o,a;if(e instanceof i.a){var s=b([t.index,t.index+t.length].map((function(t){return e.transformPosition(t,r!==f.a.sources.USER)})),2);o=s[0],a=s[1]}else{var u=b([t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),2);o=u[0],a=u[1]}return new d.a(o,a-o)}A.DEFAULTS={bounds:null,modules:{},placeholder:"",readOnly:!1,registry:x,scrollingContainer:null,theme:"default"},A.events=f.a.events,A.sources=f.a.sources,A.version="2.0.0-dev.46",A.imports={delta:i.a,parchment:c,"core/module":h.a,"core/theme":m.a}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=r(n(50)),o=r(n(10)),a=r(n(18)),s=r(n(51)),u=r(n(42)),c=String.fromCharCode(0),l=function(){function t(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return t.prototype.insert=function(t,e){var n={};return"string"==typeof t&&0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},t.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},t.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},t.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=o.default(t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(a.default(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},t.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},t.prototype.filter=function(t){return this.ops.filter(t)},t.prototype.forEach=function(t){this.ops.forEach(t)},t.prototype.map=function(t){return this.ops.map(t)},t.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(r){(t(r)?e:n).push(r)})),[e,n]},t.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},t.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+u.default.length(e):e.delete?t-e.delete:t}),0)},t.prototype.length=function(){return this.reduce((function(t,e){return t+u.default.length(e)}),0)},t.prototype.slice=function(e,n){void 0===e&&(e=0),void 0===n&&(n=1/0);for(var r=[],i=u.default.iterator(this.ops),o=0;o0&&r.next(o.retain-c)}for(var l=new t(i);n.hasNext()||r.hasNext();)if("insert"===r.peekType())l.push(r.next());else if("delete"===n.peekType())l.push(n.next());else{var f=Math.min(n.peekLength(),r.peekLength()),h=n.next(f),d=r.next(f);if("number"==typeof d.retain){var p={};"number"==typeof h.retain?p.retain=f:p.insert=h.insert;var g=s.default.compose(h.attributes,d.attributes,"number"==typeof h.retain);if(g&&(p.attributes=g),l.push(p),!r.hasNext()&&a.default(l.ops[l.ops.length-1],p)){var m=new t(n.rest());return l.concat(m).chop()}}else"number"==typeof d.delete&&"number"==typeof h.retain&&l.push(d)}return l.chop()},t.prototype.concat=function(e){var n=new t(this.ops.slice());return e.ops.length>0&&(n.push(e.ops[0]),n.ops=n.ops.concat(e.ops.slice(1))),n},t.prototype.diff=function(e,n){if(this.ops===e.ops)return new t;var r=[this,e].map((function(t){return t.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:c;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new t,l=i.default(r[0],r[1],n),f=u.default.iterator(this.ops),h=u.default.iterator(e.ops);return l.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case i.default.INSERT:n=Math.min(h.peekLength(),e),o.push(h.next(n));break;case i.default.DELETE:n=Math.min(e,f.peekLength()),f.next(n),o.delete(n);break;case i.default.EQUAL:n=Math.min(f.peekLength(),h.peekLength(),e);var r=f.next(n),u=h.next(n);a.default(r.insert,u.insert)?o.retain(n,s.default.diff(r.attributes,u.attributes)):o.push(u).delete(n)}e-=n}})),o.chop()},t.prototype.eachLine=function(e,n){void 0===n&&(n="\n");for(var r=u.default.iterator(this.ops),i=new t,o=0;r.hasNext();){if("insert"!==r.peekType())return;var a=r.peek(),s=u.default.length(a)-r.peekLength(),c="string"==typeof a.insert?a.insert.indexOf(n,s)-s:-1;if(c<0)i.push(r.next());else if(c>0)i.push(r.next(c));else{if(!1===e(i,r.next(1).attributes||{},o))return;o+=1,i=new t}}i.length()>0&&e(i,{},o)},t.prototype.invert=function(e){var n=new t;return this.reduce((function(t,r){if(r.insert)n.delete(u.default.length(r));else{if(r.retain&&null==r.attributes)return n.retain(r.retain),t+r.retain;if(r.delete||r.retain&&r.attributes){var i=r.delete||r.retain;return e.slice(t,t+i).forEach((function(t){r.delete?n.push(t):r.retain&&r.attributes&&n.retain(u.default.length(t),s.default.invert(r.attributes,t.attributes))})),t+i}}return t}),0),n.chop()},t.prototype.transform=function(e,n){if(void 0===n&&(n=!1),n=!!n,"number"==typeof e)return this.transformPosition(e,n);for(var r=e,i=u.default.iterator(this.ops),o=u.default.iterator(r.ops),a=new t;i.hasNext()||o.hasNext();)if("insert"!==i.peekType()||!n&&"insert"===o.peekType())if("insert"===o.peekType())a.push(o.next());else{var c=Math.min(i.peekLength(),o.peekLength()),l=i.next(c),f=o.next(c);if(l.delete)continue;f.delete?a.push(f):a.retain(c,s.default.transform(l.attributes,f.attributes,n))}else a.retain(u.default.length(i.next()));return a.chop()},t.prototype.transformPosition=function(t,e){void 0===e&&(e=!1),e=!!e;for(var n=u.default.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var i=n.peekLength(),o=n.peekType();n.next(),"delete"!==o?("insert"===o&&(r1){var n=t.slice(1);this.append.apply(this,n)}},t.prototype.at=function(t){for(var e=this.iterator(),n=e();n&&t>0;)t-=1,n=e();return n},t.prototype.contains=function(t){for(var e=this.iterator(),n=e();n;){if(n===t)return!0;n=e()}return!1},t.prototype.indexOf=function(t){for(var e=this.iterator(),n=e(),r=0;n;){if(n===t)return r;r+=1,n=e()}return-1},t.prototype.insertBefore=function(t,e){null!=t&&t!==e&&(this.remove(t),t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n=this.iterator(),r=n();r;){var i=r.length();if(to?n(s,t-o,Math.min(e,o+u-t)):n(s,0,Math.min(u,t+e-o)),o+=u,s=a()}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n=this.iterator(),r=n();r;)e=t(e,r),r=n();return e},t}(),u=s,c=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},o(t,e)},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return c(e,t),e}(Error),f=function(){function t(){this.attributes={},this.classes={},this.tags={},this.types={}}return t.find=function(t,e){return void 0===e&&(e=!1),null==t?null:this.blots.has(t)?this.blots.get(t)||null:e?this.find(t.parentNode,e):null},t.prototype.create=function(e,n,r){var i=this.query(n);if(null==i)throw new l("Unable to create "+n+" blot");var o=i,a=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:o.create(r),s=new o(e,a,r);return t.blots.set(s.domNode,s),s},t.prototype.find=function(e,n){return void 0===n&&(n=!1),t.find(e,n)},t.prototype.query=function(t,e){var n,r=this;return void 0===e&&(e=a.ANY),"string"==typeof t?n=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?n=this.types.text:"number"==typeof t?t&a.LEVEL&a.BLOCK?n=this.types.block:t&a.LEVEL&a.INLINE&&(n=this.types.inline):t instanceof HTMLElement&&((t.getAttribute("class")||"").split(/\s+/).some((function(t){return!!(n=r.classes[t])})),n=n||this.tags[t.tagName]),null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null},t.prototype.register=function(){for(var t=this,e=[],n=0;n1)return e.map((function(e){return t.register(e)}));var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new l("Invalid definition");if("abstract"===r.blotName)throw new l("Cannot register abstract class");return this.types[r.blotName||r.attrName]=r,"string"==typeof r.keyName?this.attributes[r.keyName]=r:(null!=r.className&&(this.classes[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map((function(t){return t.toUpperCase()})):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach((function(e){null!=t.tags[e]&&null!=r.className||(t.tags[e]=r)})))),r},t.blots=new WeakMap,t}(),h=f,d=function(){function t(t,e){this.scroll=t,this.domNode=e,h.blots.set(e,this),this.prev=null,this.next=null}return t.create=function(t){if(null==this.tagName)throw new l("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t,10).toString()===t&&(t=parseInt(t,10))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!1,configurable:!0}),t.prototype.attach=function(){},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return this.scroll.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),h.blots.delete(this.domNode)},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var i=this.isolate(t,e);if(null!=this.scroll.query(n,a.BLOT)&&r)i.wrap(n,r);else if(null!=this.scroll.query(n,a.ATTRIBUTE)){var o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?this.scroll.create("text",e):this.scroll.create(e,n),i=this.split(t);this.parent.insertBefore(r,i||void 0)},t.prototype.isolate=function(t,e){var n=this.split(t);if(null==n)throw new Error("Attempt to isolate at end");return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){!this.statics.requiredContainer||this.parent instanceof this.statics.requiredContainer||this.wrap(this.statics.requiredContainer.blotName)},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?this.scroll.create(t,e):t;return null!=this.parent&&(this.parent.insertBefore(n,this.next||void 0),this.remove()),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?this.scroll.create(t,e):t;if(null!=this.parent&&this.parent.insertBefore(n,this.next||void 0),"function"!=typeof n.appendChild)throw new l("Cannot wrap "+t);return n.appendChild(this),n},t.blotName="abstract",t}(),p=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function g(t,e){var n=e.find(t);if(null==n)try{n=e.create(t)}catch(r){n=e.create(a.INLINE),Array.from(t.childNodes).forEach((function(t){n.domNode.appendChild(t)})),t.parentNode&&t.parentNode.replaceChild(n.domNode,t),n.attach()}return n}var m=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.uiNode=null,r.build(),r}return p(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach((function(t){t.attach()}))},e.prototype.attachUI=function(t){null!=this.uiNode&&this.uiNode.remove(),this.uiNode=t,e.uiClass&&this.uiNode.classList.add(e.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)},e.prototype.build=function(){var t=this;this.children=new u,Array.from(this.domNode.childNodes).filter((function(e){return e!==t.uiNode})).reverse().forEach((function(e){try{var n=g(e,t.scroll);t.insertBefore(n,t.children.head||void 0)}catch(r){if(r instanceof l)return;throw r}}))},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,(function(t,e,n){t.deleteAt(e,n)}))},e.prototype.descendant=function(t,n){void 0===n&&(n=0);var r=this.children.find(n),i=r[0],o=r[1];return null==t.blotName&&t(i)||null!=t.blotName&&i instanceof t?[i,o]:i instanceof e?i.descendant(t,o):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var i=[],o=r;return this.children.forEachAt(n,r,(function(n,r,a){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&i.push(n),n instanceof e&&(i=i.concat(n.descendants(t,r,o))),o-=a})),i},e.prototype.detach=function(){this.children.forEach((function(t){t.detach()})),t.prototype.detach.call(this)},e.prototype.enforceAllowedChildren=function(){var t=this,n=!1;this.children.forEach((function(r){n||t.statics.allowedChildren.some((function(t){return r instanceof t}))||(r.statics.scope===a.BLOCK_BLOT?(null!=r.next&&t.splitAfter(r),null!=r.prev&&t.splitAfter(r.prev),r.parent.unwrap(),n=!0):r instanceof e?r.unwrap():r.remove())}))},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,(function(t,e,i){t.formatAt(e,i,n,r)}))},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),i=r[0],o=r[1];if(i)i.insertAt(o,e,n);else{var a=null==n?this.scroll.create("text",e):this.scroll.create(e,n);this.appendChild(a)}},e.prototype.insertBefore=function(t,e){if(t!==e){null!=t.parent&&t.parent.children.remove(t);var n=null;this.children.insertBefore(t,e||null),t.parent=this,null!=e&&(n=e.domNode),t.domNode.parentNode===this.domNode&&t.domNode.nextSibling===n||this.domNode.insertBefore(t.domNode,n),t.attach()}},e.prototype.length=function(){return this.children.reduce((function(t,e){return t+e.length()}),0)},e.prototype.moveChildren=function(t,e){this.children.forEach((function(n){t.insertBefore(n,e)}))},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),this.enforceAllowedChildren(),null!=this.uiNode&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),0===this.children.length)if(null!=this.statics.defaultChild){var n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),i=r[0],o=r[1],a=[[this,t]];return i instanceof e?a.concat(i.path(o,n)):(null!=i&&a.push([i,o]),a)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replaceWith=function(n,r){var i="string"==typeof n?this.scroll.create(n,r):n;return i instanceof e&&this.moveChildren(i),t.prototype.replaceWith.call(this,i)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent&&this.parent.insertBefore(n,this.next||void 0),this.children.forEachAt(t,this.length(),(function(t,r,i){var o=t.split(r,e);null!=o&&n.appendChild(o)})),n},e.prototype.splitAfter=function(t){for(var e=this.clone();null!=t.next;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e},e.prototype.unwrap=function(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],i=[];t.forEach((function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),i.push.apply(i,t.removedNodes))})),i.forEach((function(t){if(null==t.parentNode||t instanceof Element&&("IFRAME"===t.tagName||null!=t.querySelector("iframe"))||!(document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=n.scroll.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}})),r.filter((function(t){return t.parentNode===n.domNode||t===n.uiNode})).sort((function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1})).forEach((function(t){var e=null;null!=t.nextSibling&&(e=n.scroll.find(t.nextSibling));var r=g(t,n.scroll);r.next===e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))})),this.enforceAllowedChildren()},e.uiClass="",e}(d),y=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y(e,t),e.prototype.checkMerge=function(){return null!==this.next&&this.next.statics.blotName===this.statics.blotName},e.prototype.deleteAt=function(e,n){t.prototype.deleteAt.call(this,e,n),this.enforceAllowedChildren()},e.prototype.formatAt=function(e,n,r,i){t.prototype.formatAt.call(this,e,n,r,i),this.enforceAllowedChildren()},e.prototype.insertAt=function(e,n,r){t.prototype.insertAt.call(this,e,n,r),this.enforceAllowedChildren()},e.prototype.optimize=function(e){t.prototype.optimize.call(this,e),this.children.length>0&&null!=this.next&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())},e.blotName="container",e.scope=a.BLOCK_BLOT,e}(m),b=v,w=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return w(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.INLINE_BLOT,e}(d),T=E,x=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var r=a.TYPE&a.ATTRIBUTE;this.scope=null!=n.scope?n.scope&a.LEVEL|r:a.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return Array.from(t.attributes).map((function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1)},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}(),A=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function S(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}var _=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return A(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){S(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(S(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(x),O=_,R=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return R(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style.setProperty(this.keyName,e),!0)},e.prototype.remove=function(t){t.style.removeProperty(this.keyName),t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style.getPropertyValue(this.keyName).trim();return this.canAdd(t,e)?e:""},e}(x),k=C,N=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=h.find(this.domNode);if(null!=e){var n=x.keys(this.domNode),r=O.keys(this.domNode),i=k.keys(this.domNode);n.concat(r).concat(i).forEach((function(n){var r=e.scroll.query(n,a.ATTRIBUTE);r instanceof x&&(t.attributes[r.attrName]=r)}))}},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}(),I=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.attributes=new N(r.domNode),r}return I(e,t),e.formats=function(t,n){var r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName)return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,n){var r=this;if(t!==this.statics.blotName||n){var i=this.scroll.query(t,a.INLINE);if(null==i)return;i instanceof x?this.attributes.attribute(i,n):!n||t===this.statics.blotName&&this.formats()[t]===n||this.replaceWith(t,n)}else this.children.forEach((function(t){t instanceof e||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap()},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.formatAt=function(e,n,r,i){null!=this.formats()[r]||this.scroll.query(r,a.ATTRIBUTE)?this.isolate(e,n).format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var i=this.next;i instanceof e&&i.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,i.formats())&&(i.moveChildren(this),i.remove())},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.prototype.wrap=function(n,r){var i=t.prototype.wrap.call(this,n,r);return i instanceof e&&this.attributes.move(i),i},e.allowedChildren=[e,T],e.blotName="inline",e.scope=a.INLINE_BLOT,e.tagName="SPAN",e}(m),L=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),M=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.attributes=new N(r.domNode),r}return L(e,t),e.formats=function(t,n){var r=n.query(e.blotName);if(null==r||t.tagName!==r.tagName)return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,n){var r=this.scroll.query(t,a.BLOCK);null!=r&&(r instanceof x?this.attributes.attribute(r,n):t!==this.statics.blotName||n?!n||t===this.statics.blotName&&this.formats()[t]===n||this.replaceWith(t,n):this.replaceWith(e.blotName))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.formatAt=function(e,n,r,i){null!=this.scroll.query(r,a.BLOCK)?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=this.scroll.query(n,a.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var i=this.split(e);if(null==i)throw new Error("Attempt to insertAt after block boundaries");var o=this.scroll.create(n,r);i.parent.insertBefore(o,i)}},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some((function(t){return t.target===r.domNode&&"attributes"===t.type}))&&this.attributes.build()},e.blotName="block",e.scope=a.BLOCK_BLOT,e.tagName="P",e.allowedChildren=[P,e,T],e}(m),j=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.formats=function(t,e){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,i){0===e&&n===this.length()?this.format(r,i):t.prototype.formatAt.call(this,e,n,r,i)},e.prototype.formats=function(){return this.statics.formats(this.domNode,this.scroll)},e}(T),B=D,U=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),F={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},H=function(t){function e(e,n){var r=t.call(this,null,n)||this;return r.registry=e,r.scroll=r,r.build(),r.observer=new MutationObserver((function(t){r.update(t)})),r.observer.observe(r.domNode,F),r.attach(),r}return U(e,t),e.prototype.create=function(t,e){return this.registry.create(this,t,e)},e.prototype.find=function(t,e){void 0===e&&(e=!1);var n=this.registry.find(t,e);return n?n.scroll===this?n:e?this.find(n.scroll.domNode.parentNode,!0):null:null},e.prototype.query=function(t,e){return void 0===e&&(e=a.ANY),this.registry.query(t,e)},e.prototype.register=function(){for(var t,e=[],n=0;n0;)e.push(o.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(i.has(t.domNode)||i.set(t.domNode,[]),e&&a(t.parent))},s=function(t){i.has(t.domNode)&&(t instanceof m&&t.children.forEach(s),i.delete(t.domNode),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach((function(t){var e=r.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(r.find(t.previousSibling,!1)),Array.from(t.addedNodes).forEach((function(t){var e=r.find(t,!1);a(e,!1),e instanceof m&&e.children.forEach((function(t){a(t,!1)}))}))):"attributes"===t.type&&a(e.prev)),a(e))})),this.children.forEach(s),o=(u=Array.from(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),e=e||this.observer.takeRecords();var i=new WeakMap;e.map((function(t){var e=r.find(t.target,!0);return null==e?null:i.has(e.domNode)?(i.get(e.domNode).push(t),null):(i.set(e.domNode,[t]),e)})).forEach((function(t){null!=t&&t!==r&&i.has(t.domNode)&&t.update(i.get(t.domNode)||[],n)})),n.mutationsMap=i,i.has(this.domNode)&&t.prototype.update.call(this,i.get(this.domNode),n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild=M,e.allowedChildren=[M,b],e.scope=a.BLOCK_BLOT,e.tagName="DIV",e}(m),V=H,G=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),q=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.text=r.statics.value(r.domNode),r}return G(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){return t.data},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next||void 0),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.INLINE_BLOT,e}(T)},function(t,e,n){"use strict";var r=n(43),i=n.n(r),o=n(25),a=n(11);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n1?e-1:0),r=1;r0&&(t1&&void 0!==arguments[1]&&arguments[1];if(e&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=m(w(n.prototype),"split",this).call(this,t,e);return this.cache={},i}}]),n}(o.BlockBlot);E.blotName="block",E.tagName="P",E.defaultChild=a.a,E.allowedChildren=[a.a,s.a,o.EmbedBlot,u.a];var T=function(t){y(n,t);var e=b(n);function n(){return d(this,n),e.apply(this,arguments)}return g(n,[{key:"attach",value:function(){m(w(n.prototype),"attach",this).call(this),this.attributes=new o.AttributorStore(this.domNode)}},{key:"delta",value:function(){return(new i.a).insert(this.value(),f(f({},this.formats()),this.attributes.values()))}},{key:"format",value:function(t,e){var n=this.scroll.query(t,o.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,e,r){if("string"==typeof e&&e.endsWith("\n")){var i=this.scroll.create(E.blotName);this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,e.slice(0,-1))}else m(w(n.prototype),"insertAt",this).call(this,t,e,r)}}]),n}(o.EmbedBlot);function x(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.descendants(o.LeafBlot).reduce((function(t,n){return 0===n.length()?t:t.insert(n.value(),A(n,{},e))}),new i.a).insert("\n",A(t))}function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return null==t?e:("function"==typeof t.formats&&(e=f(f({},e),t.formats()),n&&delete e["code-token"]),null==t.parent||"scroll"===t.parent.statics.blotName||t.parent.statics.scope!==t.statics.scope?e:A(t.parent,e,n))}T.scope=o.Scope.BLOCK_BLOT},function(t,e,n){"use strict";var r=n(10),i=n.n(r),o=n(18),a=n.n(o),s=n(17),u=n.n(s),c=n(1),l=n.n(c),f=n(2),h=n(6),d=n(16),p=n(4),g=n(8),m=n(7);function y(t){return _(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||x()}function v(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function b(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach((function(i){n.scroll.lines(t,Math.max(e,1)).forEach((function(t){t.format(i,r[i])}))})),this.scroll.optimize();var o=(new l.a).retain(t).retain(e,i()(r));return this.update(o)}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e,i,r[i])}));var o=(new l.a).retain(t).retain(e,i()(r));return this.update(o)}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new l.a)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach((function(t){var e=T(t,1)[0];e instanceof p.d?n.push(e):e instanceof f.LeafBlot&&r.push(e)})):(n=this.scroll.lines(t,e),r=this.scroll.descendants(f.LeafBlot,t,e));var i=T([n,r].map((function(t){if(0===t.length)return{};for(var e=Object(p.c)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=I(Object(p.c)(n),e)}return e})),2);return n=i[0],r=i[1],b(b({},n),r)}},{key:"getHTML",value:function(t,e){var n=T(this.scroll.line(t),2),r=n[0],i=n[1];return r.length()>=i+e?N(r,i,e,!0):N(this.scroll,t,e,!0)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new l.a).retain(t).insert(w({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach((function(i){n.scroll.formatAt(t,e.length,i,r[i])})),this.update((new l.a).retain(t).insert(e,i()(r)))}},{key:"isBlank",value:function(){if(0===this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===p.d.blotName&&!(t.children.length>1)&&t.children.head instanceof g.a}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=T(this.scroll.line(t+e),2),i=r[0],o=r[1],a=0,s=new l.a;null!=i&&(a=i.length()-o,s=i.delta().slice(o,o+a-1).insert("\n"));var u=this.getContents(t,e+a).diff((new l.a).insert(n).concat(s)),c=(new l.a).retain(t).concat(u);return this.applyDelta(c)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(R)&&this.scroll.find(e[0].target)){var i=this.scroll.find(e[0].target),o=Object(p.c)(i),s=i.offset(this.scroll),u=e[0].oldValue.replace(d.a.CONTENTS,""),c=(new l.a).insert(u),f=(new l.a).insert(i.value()),h=n&&{oldRange:L(n.oldRange,-s),newRange:L(n.newRange,-s)};t=(new l.a).retain(s).concat(c.diff(f,h)).reduce((function(t,e){return e.insert?t.insert(e.insert,o):t.push(e)}),new l.a),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&a()(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}],n&&O(e.prototype,n),r&&O(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function k(t,e,n){if(0===t.length){var r=T(P(n.pop()),1)[0];return e<=0?""):"").concat(k([],e-1,n))}var i=y(t),o=i[0],a=o.child,s=o.offset,u=o.length,c=o.indent,l=o.type,f=i.slice(1),h=T(P(l),2),d=h[0],p=h[1];if(c>e)return n.push(l),c===e+1?"<".concat(d,">").concat(N(a,s,u)).concat(k(f,c,n)):"<".concat(d,">
  • ").concat(k(t,e+1,n));var g=n[n.length-1];if(c===e&&l===g)return"
  • ").concat(N(a,s,u)).concat(k(f,c,n));var m=T(P(n.pop()),1)[0];return"").concat(k(t,e-1,n))}function N(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"==typeof t.html)return t.html(e,n);if(t instanceof m.a)return Object(m.b)(t.value().slice(e,e+n));if(t.children){if("list-container"===t.statics.blotName){var i=[];return t.children.forEachAt(e,n,(function(t,e,n){var r=t.formats();i.push({child:t,offset:e,length:n,indent:r.indent||(r["list-level"]?r["list-level"]-1:0),type:r.list})})),k(i,-1,[])}var o=[];if(t.children.forEachAt(e,n,(function(t,e,n){o.push(N(t,e,n))})),r||"list"===t.statics.blotName)return o.join("");var a=t.domNode,s=a.outerHTML,u=a.innerHTML,c=T(s.split(">".concat(u,"<")),2),l=c[0],f=c[1];return"'.concat(o.join(""),"<").concat(f):"".concat(l,">").concat(o.join(""),"<").concat(f)}return t.domNode.outerHTML}function I(t,e){return Object.keys(e).reduce((function(n,r){return null==t[r]||(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]]),n}),{})}function P(t){var e="ordered"===t?"ol":"ul";switch(t){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function L(t,e){var n=t.index,r=t.length;return new h.a(n+e,r)}e.a=C},function(t,e,n){"use strict";n.d(e,"a",(function(){return v})),n.d(e,"b",(function(){return b}));var r=n(2),i=n(10),o=n.n(i),a=n(18),s=n.n(a),u=n(3),c=n(11);function l(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||h(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0;m(this,t),this.index=e,this.length=n})),b=function(){function t(e,n){var r=this;m(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new v(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){r.mouseDown||setTimeout(r.update.bind(r,u.a.sources.USER),1)})),this.emitter.on(u.a.events.SCROLL_BEFORE_UPDATE,(function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(u.a.events.SCROLL_UPDATE,(function(){try{r.root.contains(t.start.node)&&r.root.contains(t.end.node)&&r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset),r.update(u.a.sources.SILENT)}catch(e){}}))}})),this.emitter.on(u.a.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range,i=n.startNode,o=n.startOffset,a=n.endNode,s=n.endOffset;r.setNativeRange(i,o,a,s),r.update(u.a.sources.SILENT)}})),this.update(u.a.sources.SILENT)}return g(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(u.a.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!this.scroll.query(t,r.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var i=this.scroll.find(n.start.node,!1);if(null==i)return;if(i instanceof r.LeafBlot){var o=i.split(n.start.offset);i.parent.insertBefore(this.cursor,o)}else i.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}},{key:"getBounds",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.scroll.length();t=Math.min(t,r-1),n=Math.min(t+n,r-1)-t;var i=f(this.scroll.leaf(t),2),o=i[0],a=i[1];if(null==o)return null;var s=f(o.position(a,!0),2);e=s[0],a=s[1];var u=document.createRange();if(n>0){u.setStart(e,a);var c=f(this.scroll.leaf(t+n),2);if(o=c[0],a=c[1],null==o)return null;var l=f(o.position(a,!0),2);return e=l[0],a=l[1],u.setEnd(e,a),u.getBoundingClientRect()}var h,d="left";if(e instanceof Text){if(!e.data.length)return null;a0&&(d="right");return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}},{key:"getNativeRange",value:function(){var t,e=document.getSelection();if(null==e||e.rangeCount<=0)return null;try{t=e.getRangeAt(0)}catch(r){return null}if(null==t)return null;var n=this.normalizeNative(t);return y.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];var e=this.getNativeRange();return null==e?[null,null]:[this.normalizedToRange(e),e]}},{key:"hasFocus",value:function(){return document.activeElement===this.root||w(this.scroll,document.activeElement)}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var i=n.map((function(t){var n=f(t,2),i=n[0],o=n[1],a=e.scroll.find(i,!0),s=a.offset(e.scroll);return 0===o?s:a instanceof r.ContainerBlot?s+a.length():s+a.index(i,o)})),o=Math.min(Math.max.apply(Math,l(i)),this.scroll.length()-1),a=Math.min.apply(Math,[o].concat(l(i)));return new v(a,o-a)}},{key:"normalizeNative",value:function(t){if(!w(this.scroll,t.startContainer)||!t.collapsed&&!w(this.scroll,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length>0?e.childNodes.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],i=this.scroll.length();return n.forEach((function(t,n){t=Math.min(i-1,t);var o=f(e.scroll.leaf(t),2),a=o[0],s=o[1],u=f(a.position(s,0!==n),2),c=u[0],l=u[1];r.push(c,l)})),r.length<2?r.concat(r):r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,i=f(this.scroll.line(Math.min(e.index,r)),1)[0],o=i;if(e.length>0&&(o=f(this.scroll.line(Math.min(e.index+e.length,r)),1)[0]),null!=i&&null!=o){var a=t.getBoundingClientRect();n.topa.bottom&&(t.scrollTop+=n.bottom-a.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(y.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var o=document.getSelection();if(null!=o)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||i||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||r!==a.endOffset){"BR"===t.tagName&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),"BR"===n.tagName&&(r=Array.from(n.parentNode.childNodes).indexOf(n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,r),o.removeAllRanges(),o.addRange(s)}}else o.removeAllRanges(),this.root.blur()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.a.sources.API;if("string"==typeof e&&(n=e,e=!1),y.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,l(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.a.sources.USER,e=this.lastRange,n=f(this.getRange(),2),r=n[0],i=n[1];if(this.lastRange=r,this.lastNative=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!s()(e,this.lastRange)){var a;if(!this.composing&&null!=i&&i.native.collapsed&&i.start.node!==this.cursor.textNode){var c=this.cursor.restore();c&&this.setNativeRange(c.startNode,c.startOffset,c.endNode,c.endOffset)}var l,h=[u.a.events.SELECTION_CHANGE,o()(this.lastRange),o()(e),t];(a=this.emitter).emit.apply(a,[u.a.events.EDITOR_CHANGE].concat(h)),t!==u.a.sources.SILENT&&(l=this.emitter).emit.apply(l,h)}}}]),t}();function w(t,e){try{e.parentNode}catch(r){return!1}if(!t.domNode.contains(e))return!1;var n=t.registry.find(e,!0);return n&&n.scroll===t}},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n"']/g,(function(t){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[t]}))}},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n}));o.DEFAULTS={},e.a=o},function(t,e,n){(function(t,n){var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",u="[object Function]",c="[object GeneratorFunction]",l="[object Map]",f="[object Number]",h="[object Object]",d="[object Promise]",p="[object RegExp]",g="[object Set]",m="[object String]",y="[object Symbol]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",E="[object Float32Array]",T="[object Float64Array]",x="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",_="[object Uint8Array]",O="[object Uint8ClampedArray]",R="[object Uint16Array]",C="[object Uint32Array]",k=/\w*$/,N=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,P={};P[o]=P["[object Array]"]=P[b]=P[w]=P[a]=P[s]=P[E]=P[T]=P[x]=P[A]=P[S]=P[l]=P[f]=P[h]=P[p]=P[g]=P[m]=P[y]=P[_]=P[O]=P[R]=P[C]=!0,P["[object Error]"]=P[u]=P[v]=!1;var L="object"==typeof t&&t&&t.Object===Object&&t,M="object"==typeof self&&self&&self.Object===Object&&self,j=L||M||Function("return this")(),D=e&&!e.nodeType&&e,B=D&&"object"==typeof n&&n&&!n.nodeType&&n,U=B&&B.exports===D;function F(t,e){return t.set(e[0],e[1]),t}function H(t,e){return t.add(e),t}function V(t,e,n,r){var i=-1,o=t?t.length:0;for(r&&o&&(n=t[++i]);++i-1},Ot.prototype.set=function(t,e){var n=this.__data__,r=It(n,t);return r<0?n.push([t,e]):n[r][1]=e,this},Rt.prototype.clear=function(){this.__data__={hash:new _t,map:new(pt||Ot),string:new _t}},Rt.prototype.delete=function(t){return Dt(this,t).delete(t)},Rt.prototype.get=function(t){return Dt(this,t).get(t)},Rt.prototype.has=function(t){return Dt(this,t).has(t)},Rt.prototype.set=function(t,e){return Dt(this,t).set(t,e),this},Ct.prototype.clear=function(){this.__data__=new Ot},Ct.prototype.delete=function(t){return this.__data__.delete(t)},Ct.prototype.get=function(t){return this.__data__.get(t)},Ct.prototype.has=function(t){return this.__data__.has(t)},Ct.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ot){var r=n.__data__;if(!pt||r.length<199)return r.push([t,e]),this;n=this.__data__=new Rt(r)}return n.set(t,e),this};var Ut=lt?z(lt,Object):function(){return[]},Ft=function(t){return et.call(t)};function Ht(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||I.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=i}(t.length)&&!Xt(t)}var Wt=ft||function(){return!1};function Xt(t){var e=Yt(t)?et.call(t):"";return e==u||e==c}function Yt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Zt(t){return Kt(t)?kt(t):function(t){if(!Vt(t))return ht(t);var e=[];for(var n in Object(t))tt.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}n.exports=function(t){return Pt(t,!0,!0)}}).call(this,n(39),n(40)(t))},function(t,e,n){"use strict";var r=["error","warn","log","info"],i="warn";function o(t){if(r.indexOf(t)<=r.indexOf(i)){for(var e,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a=0||r>=0?n-r:t===e?0:t0){var e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}])&&s(e.prototype,n),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),a}(r.InlineBlot);h.allowedChildren=[h,i.a,r.EmbedBlot,o.a],h.order=["cursor","inline","link","underline","strike","italic","bold","script","code"],e.a=h},function(t,e,n){"use strict";n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return b})),n.d(e,"c",(function(){return w}));var r=n(4),i=n(8),o=n(16),a=n(12),s=n(7),u=n(15),c=n(0);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n\n".concat(Object(s.b)(this.code(t,e)),"\n")}}],[{key:"create",value:function(t){var e=p(v(n),"create",this).call(this,t);return e.setAttribute("spellcheck",!1),e}}]),n}(u.a),w=function(t){g(n,t);var e=y(n);function n(){return f(this,n),e.apply(this,arguments)}return d(n,null,[{key:"register",value:function(){c.a.register(b)}}]),n}(r.d),E=function(t){g(n,t);var e=y(n);function n(){return f(this,n),e.apply(this,arguments)}return d(n)}(a.a);E.blotName="code",E.tagName="CODE",w.blotName="code-block",w.className="ql-code-block",w.tagName="DIV",b.blotName="code-block-container",b.className="ql-code-block-container",b.tagName="DIV",b.allowedChildren=[w],w.allowedChildren=[s.a,i.a,o.a],w.requiredContainer=b,w.TAB=" "},function(t,e,n){"use strict";var r=n(2),i=n(3),o=n(4),a=n(8),s=n(15),u=n(32);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){if(r instanceof o.a||s instanceof o.a)return void this.optimize();var u=s.children.head instanceof a.a?null:s.children.head;r.moveChildren(s,u),r.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,e,n,r){d(m(f.prototype),"formatAt",this).call(this,t,e,n,r),this.optimize()}},{key:"handleDragStart",value:function(t){t.preventDefault()}},{key:"insertAt",value:function(t,e,n){if(t>=this.length())if(null==n||null==this.scroll.query(e,r.Scope.BLOCK)){var i=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(i),null==n&&e.endsWith("\n")?i.insertAt(0,e.slice(0,-1),n):i.insertAt(0,e,n)}else{var o=this.scroll.create(e,n);this.appendChild(o)}else d(m(f.prototype),"insertAt",this).call(this,t,e,n);this.optimize()}},{key:"insertBefore",value:function(t,e){if(t.statics.scope===r.Scope.INLINE_BLOT){var n=this.scroll.create(this.statics.defaultChild.blotName);if(n.appendChild(t),d(m(f.prototype),"insertBefore",this).call(this,n,e),null==this.defaultUpdateAttributes)return;var i=this.defaultUpdateAttributes,o=i.paraAttributes,a=i.charAttributes,s=t.domNode;s.nodeType===Node.TEXT_NODE&&Object.entries(a).forEach((function(t){var e=l(t,2),r=e[0],i=e[1];return n.formatAt(0,s.length,r,i)})),Object.entries(o).forEach((function(t){var e=l(t,2),r=e[0],i=e[1];return n.format(r,i)}))}else d(m(f.prototype),"insertBefore",this).call(this,t,e)}},{key:"isEnabled",value:function(){return"true"===this.domNode.getAttribute("contenteditable")}},{key:"leaf",value:function(t){var e=this.path(t).pop();return e&&e[0]instanceof r.LeafBlot?e:[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(y,t)}},{key:"lines",value:function(){return function t(e,n,i){var o=[],a=i;return e.children.forEachAt(n,i,(function(e,n,i){y(e)?o.push(e):e instanceof r.ContainerBlot&&(o=o.concat(t(e,n,a))),a-=i})),o}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(d(m(f.prototype),"optimize",this).call(this,t,e),t.length>0&&this.emitter.emit(i.a.events.SCROLL_OPTIMIZE,t,e))}},{key:"path",value:function(t){return d(m(f.prototype),"path",this).call(this,t).slice(1)}},{key:"remove",value:function(){}},{key:"update",value:function(t){var e=this;if(!0!==this.batch){var n=i.a.sources.USER;if("string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter((function(t){var n=t.target,r=e.find(n,!0);return r&&r.scroll===e})),1===t.length&&"childList"===t[0].type&&1===t[0].removedNodes.length&&t[0].removedNodes[0].tagName===u.b.tagName&&0===t[0].target.childElementCount){var r=t[0],a=this.registry.find(r.target);if(a instanceof u.a){var s=r.removedNodes[0].cloneNode(!1),c=this.scroll.create(s);return a.appendChild(c),void a.deleteAt(0,c.length())}}t.length>0&&this.emitter.emit(i.a.events.SCROLL_BEFORE_UPDATE,n,t);var l,h=0===this.domNode.childElementCount,p=1===this.domNode.childElementCount&&"BR"===this.domNode.firstElementChild.tagName;if((h||p)&&(l=t.find((function(t){return"childList"===t.type&&t.target===e.domNode&&t.removedNodes.length>0}))),l){var g,y=l.removedNodes[0],v=this.registry.find(y);v&&(v instanceof o.d?g=v.delta():v.children&&v.children.head instanceof o.d&&(g=v.children.head.delta()),g&&g.eachLine((function(t,n){var r=t.ops.length>0&&t.ops[0].attributes||{};return e.defaultUpdateAttributes={charAttributes:r,paraAttributes:n},!1})))}d(m(f.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(i.a.events.SCROLL_UPDATE,n,t,p&&this.defaultUpdateAttributes?this.defaultUpdateAttributes.charAttributes:null),this.defaultUpdateAttributes&&(this.defaultUpdateAttributes=void 0)}}}],n&&h(e.prototype,n),s&&h(e,s),Object.defineProperty(e,"prototype",{writable:!1}),f}(r.ScrollBlot);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild=o.d,v.allowedChildren=[o.d,o.a,s.a],e.a=v},function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n-1},et.prototype.set=function(t,e){var n=this.__data__,r=st(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},nt.prototype.clear=function(){this.size=0,this.__data__={hash:new tt,map:new($||et),string:new tt}},nt.prototype.delete=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e},nt.prototype.get=function(t){return vt(this,t).get(t)},nt.prototype.has=function(t){return vt(this,t).has(t)},nt.prototype.set=function(t,e){var n=vt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},rt.prototype.clear=function(){this.__data__=new et,this.size=0},rt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},rt.prototype.get=function(t){return this.__data__.get(t)},rt.prototype.has=function(t){return this.__data__.has(t)},rt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof et){var r=n.__data__;if(!$||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new nt(r)}return n.set(t,e),this.size=n.size,this};var ct,lt=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[ct?a:++r];if(!1===e(i[s],s,i))break}return t};function ft(t){return null==t?void 0===t?h:c:K&&K in Object(t)?function(t){var e=P.call(t,K),n=t[K];try{t[K]=void 0;var r=!0}catch(o){}var i=M.call(t);return r&&(e?t[K]=n:delete t[K]),i}(t):function(t){return M.call(t)}(t)}function ht(t){return It(t)&&ft(t)==o}function dt(t){return!(!Nt(t)||function(t){return!!L&&L in t}(t))&&(Ct(t)?D:d).test(function(t){if(null!=t){try{return I.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t))}function pt(t){if(!Nt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Et(t),n=[];for(var r in t)("constructor"!=r||!e&&P.call(t,r))&&n.push(r);return n}function gt(t,e,n,r,i){t!==e&<(e,(function(o,a){if(i||(i=new rt),Nt(o))!function(t,e,n,r,i,o,a){var s=Tt(t,n),u=Tt(e,n),c=a.get(u);if(c)ot(t,n,c);else{var f,h,d,p,g,m=o?o(s,u,n+"",t,e,a):void 0,y=void 0===m;if(y){var v=_t(u),b=!v&&Rt(u),w=!v&&!b&&Pt(u);m=u,v||b||w?_t(s)?m=s:It(g=s)&&Ot(g)?m=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(yt);function At(t,e){return t===e||t!=t&&e!=e}var St=ht(function(){return arguments}())?ht:function(t){return It(t)&&P.call(t,"callee")&&!q.call(t,"callee")},_t=Array.isArray;function Ot(t){return null!=t&&kt(t.length)&&!Ct(t)}var Rt=X||function(){return!1};function Ct(t){if(!Nt(t))return!1;var e=ft(t);return e==s||e==u||e==a||e==f}function kt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}function Nt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function It(t){return null!=t&&"object"==typeof t}var Pt=O?function(t){return function(e){return t(e)}}(O):function(t){return It(t)&&kt(t.length)&&!!g[ft(t)]};function Lt(t){return Ot(t)?it(t,!0):pt(t)}var Mt,jt=(Mt=function(t,e,n){gt(t,e,n)},mt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Mt.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!Nt(n))return!1;var r=typeof e;return!!("number"==r?Ot(n)&&wt(e,n.length):"string"==r&&e in n)&&At(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++nc))return!1;var f=s.get(t);if(f&&s.get(e))return f==e;var h=-1,d=!0,p=n&o?new Ot:void 0;for(s.set(t,e),s.set(e,t);++h-1},St.prototype.set=function(t,e){var n=this.__data__,r=kt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},_t.prototype.clear=function(){this.size=0,this.__data__={hash:new At,map:new(ht||St),string:new At}},_t.prototype.delete=function(t){var e=Bt(this,t).delete(t);return this.size-=e?1:0,e},_t.prototype.get=function(t){return Bt(this,t).get(t)},_t.prototype.has=function(t){return Bt(this,t).has(t)},_t.prototype.set=function(t,e){var n=Bt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Ot.prototype.add=Ot.prototype.push=function(t){return this.__data__.set(t,r),this},Ot.prototype.has=function(t){return this.__data__.has(t)},Rt.prototype.clear=function(){this.__data__=new St,this.size=0},Rt.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Rt.prototype.get=function(t){return this.__data__.get(t)},Rt.prototype.has=function(t){return this.__data__.has(t)},Rt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof St){var r=n.__data__;if(!ht||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new _t(r)}return n.set(t,e),this.size=n.size,this};var Ft=ut?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=a}function Zt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function $t(t){return null!=t&&"object"==typeof t}var Jt=F?function(t){return function(e){return t(e)}}(F):function(t){return $t(t)&&Yt(t.length)&&!!N[Nt(t)]};function Qt(t){return null!=(e=t)&&Yt(e.length)&&!Xt(e)?Ct(t):Mt(t);var e}n.exports=function(t,e){return Pt(t,e)}}).call(this,n(39),n(40)(t))},function(t,e,n){"use strict";n.d(e,"b",(function(){return S})),n.d(e,"a",(function(){return A})),n.d(e,"d",(function(){return k})),n.d(e,"c",(function(){return N}));var r=n(10),i=n.n(r),o=n(18),a=n.n(o),s=n(1),u=n.n(s),c=n(2),l=n(0),f=n(11),h=n(9);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=k(t);null!=i?("function"==typeof n&&(n={handler:n}),"function"==typeof r&&(r={handler:r}),(Array.isArray(i.key)?i.key:[i.key]).forEach((function(t){var o=y(y(y({},i),{},{key:t},n),r);e.bindings[o.key]=e.bindings[o.key]||[],e.bindings[o.key].push(o)}))):x.warn("Attempted to add invalid keyboard binding",i)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(e){var n="Enter"===e.key&&229===e.which,r=e.isComposing||n;if(!e.defaultPrevented&&!r){var i=(t.bindings[e.key]||[]).concat(t.bindings[e.which]||[]).filter((function(t){return o.match(e,t)}));if(0!==i.length){var s=t.quill.getSelection();if(null!=s&&t.quill.hasFocus()){var u=p(t.quill.getLine(s.index),2),l=u[0],f=u[1],h=p(t.quill.getLeaf(s.index),2),g=h[0],m=h[1],y=p(0===s.length?[g,m]:t.quill.getLeaf(s.index+s.length),2),v=y[0],b=y[1],w=g instanceof c.TextBlot?g.value().slice(0,m):"",E=v instanceof c.TextBlot?v.value().slice(b):"",T={collapsed:0===s.length,empty:0===s.length&&l.length()<=1,format:t.quill.getFormat(s),line:l,offset:f,prefix:w,suffix:E,event:e};i.some((function(e){if(null!=e.collapsed&&e.collapsed!==T.collapsed)return!1;if(null!=e.empty&&e.empty!==T.empty)return!1;if(null!=e.offset&&e.offset!==T.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==T.format[t]})))return!1}else if("object"===d(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=T.format[t]:!1===e.format[t]?null==T.format[t]:a()(e.format[t],T.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(T.prefix)||null!=e.suffix&&!e.suffix.test(T.suffix)||!0===e.handler.call(t,s,T,e))}))&&e.preventDefault()}}}}))}},{key:"handleBackspace",value:function(t,e){var n=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(!(0===t.index||this.quill.getLength()<=1)){var r={},i=p(this.quill.getLine(t.index),1)[0],o=(new u.a).retain(t.index-n).delete(n);if(0===e.offset){var a=p(this.quill.getLine(t.index-1),1)[0];if(a&&!("block"===a.statics.blotName&&a.length()<=1)){var c=i.formats(),f=this.quill.getFormat(t.index-1,1);if(r=s.AttributeMap.diff(c,f)||{},Object.keys(r).length>0){var h=(new u.a).retain(t.index+i.length()-2).retain(1,r);o=o.compose(h)}}}this.quill.updateContents(o,l.a.sources.USER),this.quill.focus()}}},{key:"handleDelete",value:function(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=p(this.quill.getLine(t.index),1)[0],o=(new u.a).retain(t.index).delete(n);if(e.offset>=i.length()-1){var a=p(this.quill.getLine(t.index+1),1)[0];if(a){var c=i.formats(),f=this.quill.getFormat(t.index,1);r=s.AttributeMap.diff(c,f)||{},Object.keys(r).length>0&&(o=o.retain(a.length()-1).retain(1,r))}}this.quill.updateContents(o,l.a.sources.USER),this.quill.focus()}}},{key:"handleDeleteRange",value:function(t){N({range:t,quill:this.quill}),this.quill.focus()}},{key:"handleEnter",value:function(t,e){var n=this,r=Object.keys(e.format).reduce((function(t,r){return n.quill.scroll.query(r,c.Scope.BLOCK)&&!Array.isArray(e.format[r])&&(t[r]=e.format[r]),t}),{}),i=(new u.a).retain(t.index).delete(t.length).insert("\n",r);this.quill.updateContents(i,l.a.sources.USER),this.quill.setSelection(t.index+1,l.a.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==r[t]&&(Array.isArray(e.format[t])||"code"!==t&&"link"!==t&&n.quill.format(t,e.format[t],l.a.sources.USER))}))}}],r=[{key:"match",value:function(t,e){return!["altKey","ctrlKey","metaKey","shiftKey"].some((function(n){return!!e[n]!==t[n]&&null!==e[n]}))&&(e.key===t.key||e.key===t.which)}}],n&&b(e.prototype,n),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(h.a);function _(t){return{key:"Tab",shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=this.quill.scroll.query("code-block"),r=0===e.length?this.quill.getLines(e.index,1):this.quill.getLines(e),i=e.index,o=e.length;r.forEach((function(e,r){t?(e.insertAt(0,n.TAB),0===r?i+=n.TAB.length:o+=n.TAB.length):e.domNode.textContent.startsWith(n.TAB)&&(e.deleteAt(0,n.TAB.length),0===r?i-=n.TAB.length:o-=n.TAB.length)})),this.quill.update(l.a.sources.USER),this.quill.setSelection(i,o,l.a.sources.SILENT)}}}function O(t,e){var n;return v(n={key:t,shiftKey:e,altKey:null},"ArrowLeft"===t?"prefix":"suffix",/^$/),v(n,"handler",(function(n){var r=n.index;return"ArrowRight"===t&&(r+=n.length+1),!(p(this.quill.getLeaf(r),1)[0]instanceof c.EmbedBlot&&("ArrowLeft"===t?e?this.quill.setSelection(n.index-1,n.length+1,l.a.sources.USER):this.quill.setSelection(n.index-1,l.a.sources.USER):e?this.quill.setSelection(n.index,n.length+1,l.a.sources.USER):this.quill.setSelection(n.index+n.length+1,l.a.sources.USER),1))})),n}function R(t){return{key:t[0],shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],l.a.sources.USER)}}}function C(t){return{key:t?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler:function(e,n){var r=t?"prev":"next",i=n.line,o=i.parent[r];if(null!=o){if("table-row"===o.statics.blotName){for(var a=o.children.head,s=i;null!=s.prev;)s=s.prev,a=a.next;var u=a.offset(this.quill.scroll)+Math.min(n.offset,a.length()-1);this.quill.setSelection(u,0,l.a.sources.USER)}}else{var c=i.table()[r];null!=c&&(t?this.quill.setSelection(c.offset(this.quill.scroll)+c.length()-1,0,l.a.sources.USER):this.quill.setSelection(c.offset(this.quill.scroll),0,l.a.sources.USER))}return!1}}}function k(t){if("string"==typeof t||"number"==typeof t)t={key:t};else{if("object"!==d(t))return null;t=i()(t)}return t.shortKey&&(t[A]=t.shortKey,delete t.shortKey),t}function N(t){var e=t.quill,n=t.range,r=e.getLines(n),i={};if(r.length>1){var o=r[0].formats(),a=r[r.length-1].formats();i=s.AttributeMap.diff(a,o)||{}}e.deleteText(n,l.a.sources.USER),Object.keys(i).length>0&&e.formatLine(n.index,1,i,l.a.sources.USER),e.setSelection(n.index,l.a.sources.SILENT)}S.DEFAULTS={bindings:{bold:R("bold"),italic:R("italic"),underline:R("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","+1",l.a.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){return!(!e.collapsed||0===e.offset)||(this.quill.format("indent","-1",l.a.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",l.a.sources.USER):null!=e.format.list&&this.quill.format("list",!1,l.a.sources.USER)}},"indent code-block":_(!0),"outdent code-block":_(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,l.a.sources.USER)}},tab:{key:"Tab",handler:function(t,e){if(e.format.table)return!0;this.quill.history.cutoff();var n=(new u.a).retain(t.index).delete(t.length).insert("\t");return this.quill.updateContents(n,l.a.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,l.a.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler:function(){this.quill.format("blockquote",!1,l.a.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler:function(t,e){var n={list:!1};e.format.indent&&(n.indent=!1),this.quill.formatLine(t.index,t.length,n,l.a.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler:function(t){var e=p(this.quill.getLine(t.index),2),n=e[0],r=e[1],i=y(y({},n.formats()),{},{list:"checked"}),o=(new u.a).retain(t.index).insert("\n",i).retain(n.length()-r-1).retain(1,{list:"unchecked"});this.quill.updateContents(o,l.a.sources.USER),this.quill.setSelection(t.index+1,l.a.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=p(this.quill.getLine(t.index),2),r=n[0],i=n[1],o=(new u.a).retain(t.index).insert("\n",e.format).retain(r.length()-i-1).retain(1,{header:null});this.quill.updateContents(o,l.a.sources.USER),this.quill.setSelection(t.index+1,l.a.sources.SILENT),this.quill.scrollIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler:function(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler:function(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler:function(t){var e=this.quill.getModule("table");if(e){var n=p(e.getTable(t),4),r=n[0],i=function(t,e,n,r){return null==e.prev&&null==e.next?null==n.prev&&null==n.next?0===r?-1:1:null==n.prev?-1:1:null==e.prev?-1:null==e.next?1:null}(0,n[1],n[2],n[3]);if(null==i)return;var o=r.offset();if(i<0){var a=(new u.a).retain(o).insert("\n");this.quill.updateContents(a,l.a.sources.USER),this.quill.setSelection(t.index+1,t.length,l.a.sources.SILENT)}else if(i>0){o+=r.length();var s=(new u.a).retain(o).insert("\n");this.quill.updateContents(s,l.a.sources.USER),this.quill.setSelection(o,l.a.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler:function(t,e){var n=e.event,r=e.line,i=r.offset(this.quill.scroll);n.shiftKey?this.quill.setSelection(i-1,l.a.sources.USER):this.quill.setSelection(i+r.length(),l.a.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){if(null==this.quill.scroll.query("list"))return!0;var n,r=e.prefix.length,i=p(this.quill.getLine(t.index),2),o=i[0],a=i[1];if(a>r)return!0;switch(e.prefix.trim()){case"[]":case"[ ]":n="unchecked";break;case"[x]":n="checked";break;case"-":case"*":n="bullet";break;default:n="ordered"}this.quill.insertText(t.index," ",l.a.sources.USER),this.quill.history.cutoff();var s=(new u.a).retain(t.index-a).delete(r+1).retain(o.length()-2-a).retain(1,{list:n});return this.quill.updateContents(s,l.a.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-r,l.a.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler:function(t){for(var e=p(this.quill.getLine(t.index),2),n=e[0],r=e[1],i=2,o=n;null!=o&&o.length()<=1&&o.formats()["code-block"];)if(o=o.prev,(i-=1)<=0){var a=(new u.a).retain(t.index+n.length()-r-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,l.a.sources.USER),this.quill.setSelection(t.index-1,l.a.sources.SILENT),!1}return!0}},"embed left":O("ArrowLeft",!1),"embed left shift":O("ArrowLeft",!0),"embed right":O("ArrowRight",!1),"embed right shift":O("ArrowRight",!0),"table down":C(!1),"table up":C(!0)}}},function(t,e,n){"use strict";function r(t,e){for(var n=0;nr&&this.stack.undo.length>0){var i=this.stack.undo.pop();n=n.compose(i)}else this.lastRecorded=r;0!==n.length()&&(this.stack.undo.push(n),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){h(this.stack.undo,t),h(this.stack.redo,t)}},{key:"undo",value:function(){this.change("undo","redo")}}])&&a(e.prototype,n),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(n(9).a);function h(t,e){for(var n=e,r=t.length-1;r>=0;r-=1){var i=t[r];t[r]=n.transform(i,!0),n=i.transform(n),0===t[r].length()&&t.splice(r,1)}}function d(t,e){var n=e.reduce((function(t,e){return t+(e.delete||0)}),0),i=e.length()-n;return function(t,e){var n=e.ops[e.ops.length-1];return null!=n&&(null!=n.insert?"string"==typeof n.insert&&n.insert.endsWith("\n"):null!=n.attributes&&Object.keys(n.attributes).some((function(e){return null!=t.query(e,r.Scope.BLOCK)})))}(t,e)&&(i-=1),i}f.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1}},,,function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(4),o=n(8),a=n(15),s=n(16),u=n(37),c=n(12),l=n(14),f=n(7),h=n(38),d=n(33),p=n(19),g=n(1),m=n.n(g),y=n(3);function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function b(t,e){for(var n=0;n0&&this.options.handler.call(this,t,r)}}])&&b(e.prototype,n),r&&b(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(n(9).a);x.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler:function(t,e){var n=this,r=e.map((function(t){return new Promise((function(e){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.readAsDataURL(t)}))}));Promise.all(r).then((function(e){var r=e.reduce((function(t,e){return t.insert({image:e})}),(new m.a).retain(t.index).delete(t.length));n.quill.updateContents(r,y.a.sources.USER),n.quill.setSelection(t.index+e.length,y.a.sources.SILENT)}))}};var A=x;r.a.register({"blots/block":i.d,"blots/block/embed":i.a,"blots/break":o.a,"blots/container":a.a,"blots/cursor":s.a,"blots/embed":u.a,"blots/inline":c.a,"blots/scroll":l.a,"blots/text":f.a,"modules/clipboard":h.a,"modules/history":d.a,"modules/keyboard":p.b,"modules/uploader":A}),e.default={Quill:r.a}},function(t,e,n){"use strict";var r=n(2),i=n(7);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0?L(e,s):e}],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};return"italic"===r.fontStyle&&(n.italic=!0),"underline"===r.textDecoration&&(n.underline=!0),"line-through"===r.textDecoration&&(n.strike=!0),(r.fontWeight.startsWith("bold")||parseInt(r.fontWeight,10)>=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=L(e,n)),parseFloat(r.textIndent||0)>0?(new i.a).insert("\t").concat(e):e}],["li",function(t,e,n){var r=n.query(t);if(null==r||"list"!==r.blotName||!M(e,"\n"))return e;for(var o=-1,a=t.parentNode;null!=a;)["OL","UL"].includes(a.tagName)&&(o+=1),a=a.parentNode;return o<=0?e:e.reduce((function(t,e){return e.attributes&&"number"==typeof e.attributes.indent?t.push(e):t.insert(e.insert,b({indent:o},e.attributes||{}))}),new i.a)}],["ol, ul",function(t,e){var n="OL"===t.tagName?"ordered":"bullet";return L(e,"list",n)}],["pre",function(t,e,n){var r=n.query("code-block"),i=!r||r.formats(t,n);return L(e,"code-block",i)}],["tr",function(t,e){var n="TABLE"===t.parentNode.tagName?t.parentNode:t.parentNode.parentNode,r=Array.from(n.querySelectorAll("tr")).indexOf(t)+1;return L(e,"table",r)}],["b",F.bind(F,"bold")],["i",F.bind(F,"italic")],["strike",F.bind(F,"strike")],["style",function(){return new i.a}]],N=[l.a,p.a].reduce((function(t,e){return t[e.keyName]=e,t}),{}),I=[l.c,f.b,d.c,p.c,g.b,m.b].reduce((function(t,e){return t[e.keyName]=e,t}),{}),P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(a,t);var e,n,r,o=_(a);function a(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this,t,e)).quill.root.addEventListener("copy",(function(t){return n.onCaptureCopy(t,!1)})),n.quill.root.addEventListener("cut",(function(t){return n.onCaptureCopy(t,!0)})),n.quill.root.addEventListener("paste",n.onCapturePaste.bind(O(n))),n.matchers=[],k.concat(n.options.matchers).forEach((function(t){var e=T(t,2),r=e[0],i=e[1];n.addMatcher(r,i)})),n}return e=a,n=[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){var e=t.html,n=t.text,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r[h.c.blotName])return(new i.a).insert(n,E({},h.c.blotName,r[h.c.blotName]));if(!e)return(new i.a).insert(n||"");var o=this.convertHTML(e);return M(o,"\n")&&(null==o.ops[o.ops.length-1].attributes||r.table)?o.compose((new i.a).retain(o.length()-1).delete(1)):o}},{key:"convertHTML",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html").body,n=new WeakMap,r=T(this.prepareMatching(e,n),2),i=r[0],o=r[1];return U(this.quill.scroll,e,i,o,n)}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.a.sources.API;if("string"==typeof t){var r=this.convert({html:t,text:""});this.quill.setContents(r,e),this.quill.setSelection(0,s.a.sources.SILENT)}else{var o=this.convert({html:e,text:""});this.quill.updateContents((new i.a).retain(t).concat(o),n),this.quill.setSelection(t+o.length(),s.a.sources.SILENT)}}},{key:"onCaptureCopy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t.defaultPrevented){t.preventDefault();var n=T(this.quill.selection.getRange(),1)[0];if(null!=n){var r=this.onCopy(n,e),i=r.html,o=r.text;t.clipboardData.setData("text/plain",o),t.clipboardData.setData("text/html",i),e&&Object(y.c)({range:n,quill:this.quill})}}}},{key:"onCapturePaste",value:function(t){if(!t.defaultPrevented&&this.quill.isEnabled()){t.preventDefault();var e=this.quill.getSelection(!0);if(null!=e){var n=t.clipboardData.getData("text/html"),r=t.clipboardData.getData("text/plain"),i=Array.from(t.clipboardData.files||[]);if(!n&&i.length>0)this.quill.uploader.upload(e,i);else{if(n&&i.length>0){var o=(new DOMParser).parseFromString(n,"text/html");if(1===o.body.childElementCount&&"IMG"===o.body.firstElementChild.tagName)return void this.quill.uploader.upload(e,i)}this.onPaste(e,{html:n,text:r})}}}}},{key:"onCopy",value:function(t){var e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}},{key:"onPaste",value:function(t,e){var n=e.text,r=e.html,o=this.quill.getFormat(t.index),a=this.convert({text:n,html:r},o);C.log("onPaste",a,{text:n,html:r});var u=(new i.a).retain(t.index).delete(t.length).concat(a);this.quill.updateContents(u,s.a.sources.USER),this.quill.setSelection(u.length()-t.length,s.a.sources.SILENT),this.quill.scrollIntoView()}},{key:"prepareMatching",value:function(t,e){var n=[],r=[];return this.matchers.forEach((function(i){var o=T(i,2),a=o[0],s=o[1];switch(a){case Node.TEXT_NODE:r.push(s);break;case Node.ELEMENT_NODE:n.push(s);break;default:Array.from(t.querySelectorAll(a)).forEach((function(t){e.has(t)?e.get(t).push(s):e.set(t,[s])}))}})),[n,r]}}],n&&A(e.prototype,n),r&&A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),a}(c.a);function L(t,e,n){return"object"===w(e)?Object.keys(e).reduce((function(t,n){return L(t,n,e[n])}),t):t.reduce((function(t,r){if(r.attributes&&r.attributes[e])return t.push(r);var i=n?E({},e,n):{};return t.insert(r.insert,b(b({},i),r.attributes))}),new i.a)}function M(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length0&&t.nextSibling)for(var r=t.nextSibling;null!=r;){if(j(r))return e.insert("\n");var i=n.query(r);if(i&&i.prototype instanceof a.a)return e.insert("\n");r=r.firstChild}}return e}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i,o=r(n(52));!function(t){t.iterator=function(t){return new o.default(t)},t.length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}}(i||(i={})),e.default=i},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||t,a),u=r?r+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),u.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},u.prototype.listeners=function(t){var e=r?r+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,a=new Array(o);ia)){var h=e.slice(0,f);if((m=e.slice(f))===c){var d=Math.min(s,f);if((v=u.slice(0,d))===(w=h.slice(0,d)))return p(v,u.slice(d),h.slice(d),c)}}if(null===l||l===s){var g=s,m=(h=e.slice(0,g),e.slice(g));if(h===u){var y=Math.min(o-g,a-g);if((b=c.slice(c.length-y))===(E=m.slice(m.length-y)))return p(u,c.slice(0,c.length-y),m.slice(0,m.length-y),b)}}}if(r.length>0&&i&&0===i.length){var v=t.slice(0,r.index),b=t.slice(r.index+r.length);if(!(a<(d=v.length)+(y=b.length))){var w=e.slice(0,d),E=e.slice(a-y);if(v===w&&b===E)return p(v,t.slice(d,o-y),e.slice(d,a-y),b)}}return null}(t,e,l);if(h)return h}var d=s(t,e),g=t.substring(0,d);d=u(t=t.substring(d),e=e.substring(d));var m=t.substring(t.length-d),y=function(t,e){var c;if(!t)return[[r,e]];if(!e)return[[n,t]];var l=t.length>e.length?t:e,f=t.length>e.length?e:t,h=l.indexOf(f);if(-1!==h)return c=[[r,l.substring(0,h)],[i,f],[r,l.substring(h+f.length)]],t.length>e.length&&(c[0][0]=c[2][0]=n),c;if(1===f.length)return[[n,t],[r,e]];var d=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,i,o,a,f]:null}var o,a,c,l,f,h=i(n,r,Math.ceil(n.length/4)),d=i(n,r,Math.ceil(n.length/2));if(!h&&!d)return null;o=d?h&&h[4].length>d[4].length?h:d:h,t.length>e.length?(a=o[0],c=o[1],l=o[2],f=o[3]):(l=o[0],f=o[1],a=o[2],c=o[3]);var p=o[4];return[a,c,l,f,p]}(t,e);if(d){var p=d[0],g=d[1],m=d[2],y=d[3],v=d[4],b=o(p,m),w=o(g,y);return b.concat([[i,v]],w)}return function(t,e){for(var i=t.length,o=e.length,s=Math.ceil((i+o)/2),u=s,c=2*s,l=new Array(c),f=new Array(c),h=0;hi)m+=2;else if(T>o)g+=2;else if(p&&(S=u+d-w)>=0&&S=(A=i-f[S]))return a(t,e,O,T)}for(var x=-b+y;x<=b-v;x+=2){for(var A,S=u+x,_=(A=x===-b||x!==b&&f[S-1]i)v+=2;else if(_>o)y+=2;else if(!p){var O;if((E=u+d-x)>=0&&E=(A=i-A))return a(t,e,O,T)}}}return[[n,t],[r,e]]}(t,e)}(t=t.substring(0,t.length-d),e=e.substring(0,e.length-d));return g&&y.unshift([i,g]),m&&y.push([i,m]),c(y,f),y}function a(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),u=e.substring(r),c=o(i,a),l=o(s,u);return c.concat(l)}function s(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,o=0;n=0&&d(t[m][1])){var y=t[m][1].slice(-1);if(t[m][1]=t[m][1].slice(0,-1),p=y+p,g=y+g,!t[m][1]){t.splice(m,1),a--;var v=m-1;t[v]&&t[v][0]===r&&(f++,g=t[v][1]+g,v--),t[v]&&t[v][0]===n&&(l++,p=t[v][1]+p,v--),m=v}}h(t[a][1])&&(y=t[a][1].charAt(0),t[a][1]=t[a][1].slice(1),p+=y,g+=y)}if(a0||g.length>0){p.length>0&&g.length>0&&(0!==(o=s(g,p))&&(m>=0?t[m][1]+=g.substring(0,o):(t.splice(0,0,[i,g.substring(0,o)]),a++),g=g.substring(o),p=p.substring(o)),0!==(o=u(g,p))&&(t[a][1]=g.substring(g.length-o)+t[a][1],g=g.substring(0,g.length-o),p=p.substring(0,p.length-o)));var b=f+l;0===p.length&&0===g.length?(t.splice(a-b,b),a-=b):0===p.length?(t.splice(a-b,b,[r,g]),a=a-b+1):0===g.length?(t.splice(a-b,b,[n,p]),a=a-b+1):(t.splice(a-b,b,[n,p],[r,g]),a=a-b+2)}0!==a&&t[a-1][0]===i?(t[a-1][1]+=t[a][1],t.splice(a,1)):a++,f=0,l=0,p="",g=""}""===t[t.length-1][1]&&t.pop();var w=!1;for(a=1;a=55296&&t<=56319}function f(t){return t>=56320&&t<=57343}function h(t){return f(t.charCodeAt(0))}function d(t){return l(t.charCodeAt(t.length-1))}function p(t,e,o,a){return d(t)||h(a)?null:function(t){for(var e=[],n=0;n0&&e.push(t[n]);return e}([[i,t],[n,e],[r,o],[i,a]])}function g(t,e,n){return o(t,e,n,!0)}g.INSERT=r,g.DELETE=n,g.EQUAL=i,t.exports=g},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i,o=r(n(10)),a=r(n(18));!function(t){t.compose=function(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o.default(e);for(var i in n||(r=Object.keys(r).reduce((function(t,e){return null!=r[e]&&(t[e]=r[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},t.diff=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return a.default(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},t.invert=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),t=t||{};var n=Object.keys(e).reduce((function(n,r){return e[r]!==t[r]&&void 0!==t[r]&&(n[r]=e[r]),n}),{});return Object.keys(t).reduce((function(n,r){return t[r]!==e[r]&&void 0===e[r]&&(n[r]=null),n}),n)},t.transform=function(t,e,n){if(void 0===n&&(n=!1),"object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce((function(n,r){return void 0===t[r]&&(n[r]=e[r]),n}),{});return Object.keys(r).length>0?r:void 0}}}(i||(i={})),e.default=i},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(42)),o=function(){function t(t){this.ops=t,this.index=0,this.offset=0}return t.prototype.hasNext=function(){return this.peekLength()<1/0},t.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.default.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},t.prototype.peek=function(){return this.ops[this.index]},t.prototype.peekLength=function(){return this.ops[this.index]?i.default.length(this.ops[this.index])-this.offset:1/0},t.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t}();e.default=o},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(36)}]).default},t.exports=e()},907554:(t,e,n)=>{!function(){var t="undefined"!=typeof window?window:n.g,r={};for(var i in function(t,e,n){var r;function o(t){var e=0;return function(){return e>>0)+"_",r=0;return function t(i){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new e(n+(i||"")+"_"+r++,i)}})),u("Symbol.iterator",(function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var e="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n(e=e||0)&&(e=Math.max(e+r,0));e=i}})),u("Array.prototype.keys",(function(t){return t||function(){return D(this,(function(t){return t}))}}));var B="function"==typeof Object.assign?Object.assign:function(t,e){for(var n=1;nt||1342177279>>=1)&&(e+=e);return n}})),u("Number.isNaN",(function(t){return t||function(t){return"number"==typeof t&&isNaN(t)}})),u("Number.isFinite",(function(t){return t||function(t){return"number"==typeof t&&(!isNaN(t)&&1/0!==t&&-1/0!==t)}}));var U=this||self;function F(t,e){t=t.split(".");var n,r=U;t[0]in r||void 0===r.execScript||r.execScript("var "+t[0]);for(;t.length&&(n=t.shift());)t.length||void 0===e?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=e}function H(t){this.g=Math.exp(Math.log(.5)/t),this.i=this.h=0}function V(t){return t.h/(1-Math.pow(t.g,t.i))}function G(){this.h=new H(2),this.j=new H(5),this.g=0,this.i=128e3,this.l=16e3}function q(){}function z(){}function K(){}function W(t){var e=P.apply(1,arguments);X.has(t)||(X.add(t),K.apply(q,f(e)))}H.prototype.sample=function(t,e){var n=Math.pow(this.g,t);e=e*(1-n)+n*this.h,isNaN(e)||(this.h=e,this.i+=t)},G.prototype.configure=function(t){this.i=t.minTotalBytes,this.l=t.minBytes,this.h.g=Math.exp(Math.log(.5)/t.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/t.slowHalfLife)},G.prototype.sample=function(t,e){if(!(ee)throw Error("Bad port number "+e);t.Lb=e}else t.Lb=null}function Bt(t,e,n){e instanceof Wt?t.g=e:(n||(e=Ft(e,zt)),t.g=new Wt(e))}function Ut(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function Ft(t,e,n){return null!=t?(t=encodeURI(t).replace(e,Ht),n&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function Ht(t){return"%"+((t=t.charCodeAt(0))>>4&15).toString(16)+(15&t).toString(16)}(r=Mt.prototype).za="",r.sb="",r.Da="",r.Lb=null,r.va="",r.ib="",r.toString=function(){var t=[],e=this.za;if(e&&t.push(Ft(e,Vt,!0),":"),e=this.Da){t.push("//");var n=this.sb;n&&t.push(Ft(n,Vt,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.Lb)&&t.push(":",String(e))}return(e=this.va)&&(this.Da&&"/"!=e.charAt(0)&&t.push("/"),t.push(Ft(e,"/"==e.charAt(0)?qt:Gt,!0))),(e=this.g.toString())&&t.push("?",e),(e=this.ib)&&t.push("#",Ft(e,Kt)),t.join("")},r.resolve=function(t){var e=this.clone();"data"===e.za&&(e=new Mt);var n=!!t.za;n?jt(e,t.za):n=!!t.sb,n?e.sb=t.sb:n=!!t.Da,n?e.Da=t.Da:n=null!=t.Lb;var r=t.va;if(n)Dt(e,t.Lb);else if(n=!!t.va){if("/"!=r.charAt(0))if(this.Da&&!this.va)r="/"+r;else{var i=e.va.lastIndexOf("/");-1!=i&&(r=e.va.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var o=[],a=0;a=n.h||(t<=n.g&&e>=n.h?n.g=n.h=null:t<=n.g&&en.g&&e>=n.h&&(n.h=t)),T(r)}))},F("shaka.text.TextEngine",ge),ge.prototype.destroy=ge.prototype.destroy,ge.findParser=function(t){return be[t]},ge.unregisterParser=function(t){delete be[t]},ge.registerParser=function(t,e){be[t]=e};var be={};function we(){}function Ee(t,e){return t=Ae(t),e=Ae(e),t.split("-")[0]==e.split("-")[0]}function Te(t,e){return t=Ae(t),e=Ae(e),t=t.split("-"),e=e.split("-"),t[0]==e[0]&&1==t.length&&2==e.length}function xe(t,e){return t=Ae(t),e=Ae(e),t=t.split("-"),e=e.split("-"),2==t.length&&2==e.length&&t[0]==e[0]}function Ae(t){var e=t.split("-x-"),n=e[0].split("-");return t=n[0]||"",n=n[1]||"",e=e[1]?"x-"+e[1]:"",t=t.toLowerCase(),t=Ce.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function Se(t,e){return t=Ae(t),(e=Ae(e))==t?4:Te(e,t)?3:xe(e,t)?2:Te(t,e)?1:0}function _e(t){var e=t.indexOf("-");return t=(t=0<=e?t.substring(0,e):t).toLowerCase(),Ce.get(t)||t}function Oe(t){return t.language?Ae(t.language):t.audio&&t.audio.language?Ae(t.audio.language):t.video&&t.video.language?Ae(t.video.language):"und"}function Re(t,e){t=Ae(t);var n=new Set,r=l(e);for(e=r.next();!e.done;e=r.next())n.add(Ae(e.value));for(e=(r=l(n)).next();!e.done;e=r.next())if((e=e.value)==t)return e;for(e=(r=l(n)).next();!e.done;e=r.next())if(Te(e=e.value,t))return e;for(e=(r=l(n)).next();!e.done;e=r.next())if(xe(e=e.value,t))return e;for(e=(n=l(n)).next();!e.done;e=n.next())if(Te(t,e=e.value))return e;return null}F("shaka.util.LanguageUtils",we),we.findClosestLocale=Re,we.getLocaleForVariant=Oe,we.getLocaleForText=function(t){return Ae(t.language||"und")},we.getBase=_e,we.relatedness=Se,we.areSiblings=function(t,e){var n=_e(t),r=_e(e);return t!=n&&e!=r&&n==r},we.normalize=Ae,we.isSiblingOf=xe,we.isParentOf=Te,we.areLanguageCompatible=Ee,we.areLocaleCompatible=function(t,e){return(t=Ae(t))==(e=Ae(e))};var Ce=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ke(){this.g={}}function Ne(t){this.h=t,this.g=null}function Ie(t){this.h=t,this.g=null}function Pe(){return!(!t.MediaSource||!MediaSource.isTypeSupported)}function Le(t){return""!=Ge().canPlayType(t)}function Me(){return!!navigator.userAgent.match(/Edge?\//)}function je(){return Ve("Xbox One")}function De(){return Ve("Tizen")}function Be(){return Ve("Web0S")&&Ve("Chrome/38.0.2125.122 Safari/537.36")}function Ue(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!De()&&!Ve("PC=EOS")&&!Ve("VirginMedia")&&!Ve("SOPOpenBrowser")&&!Fe()&&!Ve("AFT")}function Fe(){return Ve("PlayStation 4")}function He(){if(!Ue())return null;var t=navigator.userAgent.match(/Version\/(\d+)/);return t||(t=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(t[1],10):null}function Ve(t){return(navigator.userAgent||"").includes(t)}function Ge(){return ze||(qe||(qe=new Ie((function(){ze=null}))),(ze=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ze=document.createElement("video")),qe.V(1),ze)}(r=ke.prototype).push=function(t,e){this.g.hasOwnProperty(t)?this.g[t].push(e):this.g[t]=[e]},r.get=function(t){return(t=this.g[t])?t.slice():null},r.remove=function(t,e){t in this.g&&(this.g[t]=this.g[t].filter((function(t){return t!=e})),0==this.g[t].length&&delete this.g[t])},r.forEach=function(t){for(var e in this.g)t(e,this.g[e])},r.size=function(){return Object.keys(this.g).length},r.keys=function(){return Object.keys(this.g)},Ne.prototype.V=function(e){var n=this;this.stop();var r=!0,i=null;return this.g=function(){t.clearTimeout(i),r=!1},i=t.setTimeout((function(){r&&n.h()}),1e3*e),this},Ne.prototype.stop=function(){this.g&&(this.g(),this.g=null)},Ie.prototype.Zd=function(){return this.stop(),this.h(),this},Ie.prototype.V=function(t){var e=this;return this.stop(),this.g=new Ne((function(){e.h()})).V(t),this},Ie.prototype.sa=function(t){var e=this;return this.stop(),this.g=new Ne((function(){e.g.V(t),e.h()})).V(t),this},Ie.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},F("shaka.util.Timer",Ie),Ie.prototype.stop=Ie.prototype.stop,Ie.prototype.tickEvery=Ie.prototype.sa,Ie.prototype.tickAfter=Ie.prototype.V,Ie.prototype.tickNow=Ie.prototype.Zd;var qe=null,ze=null;function Ke(){}function We(t,e,n,r,i){var o=t.variants;(e.length||n.length)&&(o=function(t,e,n){for(var r={},i=(e=l(e)).next();!i.done;r={ed:r.ed},i=e.next())if(r.ed=i.value,i=t.filter(function(t){return function(e){return e.video&&e.video.codecs.startsWith(t.ed)}}(r)),i.length){t=i;break}for(r={},n=l(n),e=n.next();!e.done;r={$c:r.$c},e=n.next())if(r.$c=e.value,e=t.filter(function(t){return function(e){return e.audio&&e.audio.codecs.startsWith(t.$c)}}(r)),e.length){t=e;break}return t}(o,e,n)),e=function(t){for(var e=new ke,n=(t=l(t)).next();!n.done;n=t.next()){var r=Ye(n=n.value);e.push(r,n)}return e}(o=gn(o,r)),e=function(t){var e=0,n=new Map,r=t.size();return t.forEach((function(t,i){for(var o=(i=l(i)).next();!o.done;o=i.next()){var a=(o=o.value).video;if(a&&a.width&&a.height){a=a.width*a.height*(a.frameRate||1),n.has(a)||n.set(a,new ke);var s=n.get(a);s.push(t,o),s.size()===r&&(e=Math.max(e,a))}}})),e?n.get(e):t}(e);var a=function(t,e){for(var n=(e=l(e)).next();!n.done;n=e.next())if((n=n.value)==Tn||n==xn){if(1==(t=Xe(t,n)).size())return t.keys()[0]}else if(n==An)break;return function(t){var e="",n=1/0;return t.forEach((function(t,r){for(var i=0,o=0,a=(r=l(r)).next();!a.done;a=r.next())i+=a.value.bandwidth||0,++o;(i/=o)n?(r.g={},r.push(t,i),n=o):o==n&&r.push(t,i)})),r}function Ye(t){var e="";t.video&&(e=fe(t.video.codecs));var n="";return t.audio&&(n=fe(t.audio.codecs)),e+"-"+n}function Ze(t,e,n){function r(t,e,n){return t>=e&&t<=n}var i=t.video;return!(i&&i.width&&i.height&&(!r(i.width,e.minWidth,Math.min(e.maxWidth,n.width))||!r(i.height,e.minHeight,Math.min(e.maxHeight,n.height))||!r(i.width*i.height,e.minPixels,e.maxPixels))||t&&t.video&&t.video.frameRate&&!r(t.video.frameRate,e.minFrameRate,e.maxFrameRate)||!r(t.bandwidth,e.minBandwidth,e.maxBandwidth))}function $e(t,e){return I((function(n){return 1==n.g?E(n,function(t,e){return I((function(n){if(1==n.g)return E(n,tn(t.variants,e,!1,[]),2);t.variants=t.variants.filter((function(t){var e=t.video;if(e){var n=rn(e.codecs);if(e.codecs.includes(",")){var r=e.codecs.split(",");n=rn(n=ne("video",r)),r=nn(r=ne("audio",r));var i=le(e.mimeType,r,"audio");if(!Y(i))return!1;n=[n,r].join()}if(!Y(r=le(e.mimeType,n,"video")))return!1;e.codecs=n}if(n=t.audio){if(r=nn(n.codecs),!Y(i=le(n.mimeType,r,"audio")))return!1;n.codecs=r}return je()&&e&&(e.width&&1920=s&&n<=a&&r.bandwidth!=o.bandwidth&&(r=o)}return this.s=Date.now(),r},r.enable=function(){this.o=!0},r.disable=function(){this.o=!1},r.segmentDownloaded=function(t,e){if(this.i.sample(t,e),null!=this.s&&this.o)t:{if(this.D){if(Date.now()-this.s<1e3*this.g.switchInterval)break t}else{if(!((t=this.i).g>=t.i))break t;this.D=!0}t=this.chooseVariant(),this.i.getBandwidthEstimate(Rn(this)),t&&this.l(t,this.g.clearBufferSwitch,this.g.safeMarginSwitch)}},r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(Rn(this))},r.setVariants=function(t){this.m=t},r.playbackRateChanged=function(t){this.A=t},r.setMediaElement=function(e){var n=this;this.j=e,this.h&&(this.h.disconnect(),this.h=null),this.j&&"ResizeObserver"in t&&(this.h=new ResizeObserver((function(){n.C.V(kn)})),this.h.observe(this.j))},r.configure=function(t){this.g=t,this.i&&this.g&&this.i.configure(this.g.advanced)},F("shaka.abr.SimpleAbrManager",On),On.prototype.configure=On.prototype.configure,On.prototype.setMediaElement=On.prototype.setMediaElement,On.prototype.playbackRateChanged=On.prototype.playbackRateChanged,On.prototype.setVariants=On.prototype.setVariants,On.prototype.getBandwidthEstimate=On.prototype.getBandwidthEstimate,On.prototype.segmentDownloaded=On.prototype.segmentDownloaded,On.prototype.disable=On.prototype.disable,On.prototype.enable=On.prototype.enable,On.prototype.chooseVariant=On.prototype.chooseVariant,On.prototype.init=On.prototype.init,On.prototype.release=On.prototype.release,On.prototype.stop=On.prototype.stop;var kn=1;function Nn(t,e,n,r,i){if(r>=i)return null;for(var o=-1,a=-1,s=0;sn||127n||0>e))if(e>=n)for(--r;0<=r;r--)t.i[e+r]=t.i[n+r].map((function(t){return t}));else for(var i=0;ie;e++)t.i.push(sr())}function sr(){for(var t=[],e=0;42>e;e++)t.push(null);return t}function ur(t,e){cr(t)&&(t.i[t.h][t.g]=new Ln(e,t.u,t.o,t.m,t.s),t.g++)}function cr(t){var e=t.g=n)r=7&n,t.h[r]&&(t.g=t.h[r]);else{if(136===n){n=yr(e).value,e=null;for(var i=(n=l(wr(t,n))).next();!i.done;i=n.next())(i=t.h[i.value]).isVisible()&&(e=lr(i,r,t.i)),ar(i);return e}if(137===n)for(n=(e=l(wr(t,e=yr(e).value))).next();!n.done;n=e.next())(n=t.h[n.value]).isVisible()||(n.j=r),n.l=!0;else{if(138===n){for(n=yr(e).value,e=null,i=(n=l(wr(t,n))).next();!i.done;i=n.next())(i=t.h[i.value]).isVisible()&&(e=lr(i,r,t.i)),i.l=!1;return e}if(139===n){for(n=yr(e).value,e=null,i=(n=l(wr(t,n))).next();!i.done;i=n.next())(i=t.h[i.value]).isVisible()?e=lr(i,r,t.i):i.j=r,i.l=!i.l;return e}if(140===n)return Er(t,e=yr(e).value,r);if(143===n)return r=Er(t,255,r),Tr(t),r;if(144===n)e.skip(1),r=yr(e).value,t.g&&(t.g.o=0<(128&r),t.g.u=0<(64&r));else if(145===n)r=yr(e).value,n=yr(e).value,e.skip(1),t.g&&(e=xr((48&n)>>4,(12&n)>>2,3&n),t.g.s=xr((48&r)>>4,(12&r)>>2,3&r),t.g.m=e);else if(146===n)r=yr(e).value,e=yr(e).value,t.g&&((t=t.g).h=15&r,t.g=63&e);else if(151===n)e.skip(1),e.skip(1),r=yr(e).value,e.skip(1),t.g&&(t.g.C=3&r);else if(152<=n&&159>=n){if(n=(15&n)-8,!(i=null!==t.h[n])){var o=new or;o.j=r,t.h[n]=o}r=yr(e).value,yr(e),yr(e),o=yr(e).value;var a=yr(e).value;e=yr(e).value,i&&!(7&e)||((e=t.h[n]).h=0,e.g=0,e.u=!1,e.o=!1,e.s="white",e.m="black"),(e=t.h[n]).l=0<(32&r),e.D=1+(15&o),e.A=1+(63&a),t.g=t.h[n]}}}return null}function wr(t,e){for(var n=[],r=0;8>r;r++)!(1&~e)&&t.h[r]&&n.push(r),e>>=1;return n}function Er(t,e,n){for(var r=null,i=(e=l(wr(t,e))).next();!i.done;i=e.next()){i=i.value;var o=t.h[i];o.isVisible()&&(r=lr(o,n,t.i)),t.h[i]=null}return r}function Tr(t){t.g=null,t.h=[null,null,null,null,null,null,null,null]}function xr(t,e,n){var r={0:0,1:0,2:1,3:1};return Sr[(t=r[t])<<2|(e=r[e])<<1|(n=r[n])]}mr.prototype.ea=function(){return this.gthis.h.length)throw new Yt(2,2,3e3);this.g+=t};var Ar=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),Sr="black blue green cyan red magenta yellow white".split(" ");function _r(t){this.h=t,this.g=void 0}function Or(){}function Rr(e){if(!e)return"";if(239==(e=rt(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),t.TextDecoder&&!Fe())return(e=(new TextDecoder).decode(e)).includes("�")&&z('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var n="",r=0;r=r+2&&192==(224&e[r])&&128==(192&e[r+1])?(i=(31&e[r])<<6|63&e[r+1],r+=1):e.length>=r+3&&224==(240&e[r])&&128==(192&e[r+1])&&128==(192&e[r+2])?(i=(15&e[r])<<12|(63&e[r+1])<<6|63&e[r+2],r+=2):e.length>=r+4&&240==(241&e[r])&&128==(192&e[r+1])&&128==(192&e[r+2])&&128==(192&e[r+3])&&(i=(7&e[r])<<18|(63&e[r+1])<<12|(63&e[r+2])<<6|63&e[r+3],r+=3):i=e[r],65535>=i)n+=String.fromCharCode(i);else{var o=1023&(i-=65536);n+=String.fromCharCode(55296+(i>>10)),n+=String.fromCharCode(56320+o)}}return n}function Cr(t,e,n){if(!t)return"";if(!n&&0!=t.byteLength%2)throw new Yt(2,2,2004);n=Math.floor(t.byteLength/2);var r=new Uint16Array(n);t=it(t);for(var i=0;i=n[t]}if(!t)return"";var n=rt(t);if(239==n[0]&&187==n[1]&&191==n[2])return Rr(n);if(254==n[0]&&255==n[1])return Cr(n.subarray(2),!1);if(255==n[0]&&254==n[1])return Cr(n.subarray(2),!0);if(0==n[0]&&0==n[2])return Cr(t,!1);if(0==n[1]&&0==n[3])return Cr(t,!0);if(e(0)&&e(1)&&e(2)&&e(3))return Rr(t);throw new Yt(2,2,2003)}function Nr(e){if(t.TextEncoder&&!Fe()){var n=new TextEncoder;return nt(n.encode(e))}e=encodeURIComponent(e),e=unescape(e),n=new Uint8Array(e.length);for(var r=0;rthis.h.byteLength)throw Mr();var e=rt(this.h,this.g,t);return this.g+=t,e},r.skip=function(t){if(this.g+t>this.h.byteLength)throw Mr();this.g+=t},r.Zf=function(t){if(this.gt||t>this.h.byteLength)throw Mr();this.g=t},r.pc=function(){for(var t=this.g;this.ea()&&0!=this.h.getUint8(this.g);)this.g+=1;return t=rt(this.h,t,this.g-t),this.g+=1,Rr(t)},F("shaka.util.DataViewReader",Lr),Lr.prototype.readTerminatedString=Lr.prototype.pc,Lr.prototype.seek=Lr.prototype.seek,Lr.prototype.rewind=Lr.prototype.Zf,Lr.prototype.skip=Lr.prototype.skip,Lr.prototype.readBytes=Lr.prototype.$a,Lr.prototype.readUint64=Lr.prototype.Mb,Lr.prototype.readInt32=Lr.prototype.Ae,Lr.prototype.readUint32=Lr.prototype.H,Lr.prototype.readUint16=Lr.prototype.ab,Lr.prototype.readUint8=Lr.prototype.Sa,Lr.prototype.getLength=Lr.prototype.getLength,Lr.prototype.getPosition=Lr.prototype.aa,Lr.prototype.hasMoreData=Lr.prototype.ea;var jr=1;function Dr(){this.h=[],this.g=[],this.i=new pr,this.l=0,this.m=new Map([["CC1",new Yn(0,0)],["CC2",new Yn(0,1)],["CC3",new Yn(1,0)],["CC4",new Yn(1,1)]]),this.s=this.o=0,this.j=new Map,this.u=!0,Br(this)}function Br(t){t.o=0,t.s=0;for(var e=l(t.m.values()),n=e.next();!n.done;n=e.next())(n=n.value).h=Qn,n.g=n.j,n.m=null,Dn(n.i),Dn(n.j),Dn(n.o);t.u=!0}function Ur(t,e){var n=e.type;if(16==(112&e.ua)){var r=e.ua>>3&1;0===n?t.o=r:t.s=r}if(n=t.m.get("CC"+(n<<1|(n?t.s:t.o)+1)),255===e.ua&&255===e.Ia||!e.ua&&!e.Ia||!Hr(e.ua)||!Hr(e.Ia))return 45<=++t.l&&Br(t),null;if(t.l=0,e.ua&=127,e.Ia&=127,!e.ua&&!e.Ia)return null;if(t=null,16==(112&e.ua))t:{if(r=e.ua,t=e.Ia,n.m===(r<<8|t))n.m=null;else if(n.m=r<<8|t,16==(240&r)&&64==(192&t)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|t>>5&1];var i=(30&t)>>1;r="white";var o=!1;7>i?r=ir[i]:7===i&&(o=!0),t=!(1&~t),n.h!==nr&&(i=n.g,n.h===er&&e!==i.g&&(Un(i,n=1+e-i.h,1+i.g-i.h,i.h),Fn(i,0,n-1),Fn(i,e+1,15-e)),i.g=e,i.m=t,i.j=o,i.l=r,i.o="black")}else if(17==(247&r)&&32==(240&t))n.g.m=!1,n.g.j=!1,n.g.l="white",Bn(n.g,Hn,32),r=!1,"white_italics"===(e=ir[(14&t)>>1])&&(e="white",r=!0),n.g.m=!(1&~t),n.g.j=r,n.g.l=e;else if(16==(247&r)&&32==(240&t)||23==(247&r)&&45==(255&t))e="black",!(7&r)&&(e=rr[(14&t)>>1]),n.g.o=e;else if(17==(247&r)&&48==(240&t))Bn(n.g,Vn,t);else if(18==(246&r)&&32==(224&t))Bn(n.g,1&r?qn:Gn,t);else if(20==(246&r)&&32==(240&t)){switch(t=e.pts,r=null,e.Ia){case 32:$n(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=Zn(n,2,t);break;case 38:r=Zn(n,3,t);break;case 39:r=Zn(n,4,t);break;case 40:Bn(n.g,Hn,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=t;break;case 42:Dn(n.o),Jn(n);break;case 43:Jn(n);break;case 44:e=n.i,r=null,n.h!==nr&&(r=jn(e,n.l,t)),Fn(e,0,15);break;case 45:e=n.g,n.h!==er?r=null:(r=jn(e,n.l,t),Un(e,(o=e.g-e.h+1)-1,o,e.h),Fn(e,0,o-1),Fn(e,e.g,15-e.g),n.l=t);break;case 46:Fn(n.j,0,15);break;case 47:e=null,n.h!==nr&&(e=jn(n.i,n.l,t)),r=n.j,n.j=n.i,n.i=r,$n(n),n.l=t,r=e}t=r;break t}t=null}else r=e.Ia,Bn(n.g,Hn,e.ua),Bn(n.g,Hn,r);return t}function Fr(t,e){var n=[];try{for(;e.ea();){var r=yr(e).value,i=(224&r)>>5,o=31&r;if(7===i&&0!=o&&(i=63&yr(e).value),0!=i){t.j.has(i)||t.j.set(i,new vr(i));for(var a=t.j.get(i),s=e.aa();e.aa()-s=c){var f=l;if(a.g){var h=a.g;switch(i=null,c){case 8:!cr(h)||0>=h.g&&0>=h.h||(0>=h.g?(h.g=h.A-1,h.h--):h.g--,h.i[h.h][h.g]=null);break;case 13:if(h.isVisible()&&(i=lr(h,f,a.i)),h.h+1>=h.D){f=h;for(var d=0,p=1;16>p;p++,d++)f.i[d]=f.i[p];for(p=0;1>p;p++,d++)f.i[d]=sr()}else h.h++;h.g=0;break;case 14:h.isVisible()&&(i=lr(h,f,a.i)),h.i[h.h]=sr(),h.g=0;break;case 12:h.isVisible()&&(i=lr(h,f,a.i)),ar(h),(f=h).h=0,f.g=0}var g=i}else g=null}else if(128<=c&&159>=c)g=br(a,i,c,l);else{if(4096<=c&&4127>=c)8<=(f=255&c)&&15>=f?i.skip(1):16<=f&&23>=f?i.skip(2):24<=f&&31>=f&&i.skip(3);else if(4224<=c&&4255>=c)128<=(f=255&c)&&135>=f?i.skip(4):136<=f&&143>=f&&i.skip(5);else if(32<=c&&127>=c)i=c,a.g&&ur(a.g,127===i?"♪":String.fromCharCode(i));else if(160<=c&&255>=c)a.g&&ur(a.g,String.fromCharCode(c));else if(4128<=c&&4223>=c){if(i=255&c,a.g)if(Ar.has(i)){var m=Ar.get(i);ur(a.g,m)}else ur(a.g,"_")}else 4256<=c&&4351>=c&&a.g&&ur(a.g,160!=(255&c)?"_":"[CC]");g=null}(i=g)&&n.push(i)}}}}catch(y){if(!(y instanceof Yt&&3e3===y.code))throw y;W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Hr(t){for(var e=0;t;)e^=1&t,t>>=1;return 1===e}function Vr(t){for(var e=[],n=t,r=t=0;r>24&255,t>>16&255,t>>8&255,255&t)}function Yr(t){return 8+(t.has64BitSize?8:0)+(null!=t.flags?4:0)}Lr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:jr},Dr.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var t=this.i;t.i=[],t.h=[],t.g=0,Br(this);for(var e=(t=l(this.j.values())).next();!e.done;e=t.next())Tr(e.value)},Dr.prototype.extract=function(t,e){if(this.u){for(var n=l(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=e;this.u=!1}if(181===(t=new Lr(t,0)).Sa()&&49===t.ab()&&1195456820===t.H()&&3===t.Sa()&&64&(n=t.Sa()))for(n&=31,t.skip(1),r=0;r>2,a=t.Sa(),s=t.Sa();o&&(0===(i&=3)||1===i?this.h.push({pts:e,type:i,ua:a,Ia:s,order:this.h.length}):(this.g.push({pts:e,type:i,value:a,order:this.g.length}),this.g.push({pts:e,type:2,value:s,order:this.g.length})))}},Dr.prototype.decode=function(){function t(t,e){return t.pts-e.pts||t.order-e.order}var e=[];this.h.sort(t),this.g.sort(t);for(var n=l(this.h),r=n.next();!r.done;r=n.next())(r=Ur(this,r.value))&&e.push(r);for(r=(n=l(this.g)).next();!r.done;r=n.next())gr(this.i,r.value);for(r=(n=l(this.i.i)).next();!r.done;r=n.next())r=Fr(this,r.value),e.push.apply(e,f(r));return this.i.i=[],this.h=[],this.g=[],e},F("shaka.cea.CeaDecoder",Dr),ct=function(){return new Dr},(r=Gr.prototype).box=function(t,e){return t=Wr(t),this.i[t]=Zr,this.h[t]=e,this},r.R=function(t,e){return t=Wr(t),this.i[t]=$r,this.h[t]=e,this},r.stop=function(){this.g=!0},r.parse=function(t,e,n){for(t=new Lr(t,0),this.g=!1;t.ea()&&!this.g;)this.nc(0,t,e,n)},r.nc=function(t,e,n,r){var i=e.aa();if(r&&i+8>e.getLength())this.g=!0;else{var o=e.H(),a=e.H(),s=Xr(a),u=!1;switch(o){case 0:o=e.getLength()-i;break;case 1:if(r&&e.aa()+8>e.getLength())return void(this.g=!0);o=e.Mb(),u=!0}var c=this.h[a];if(c){var l=null,f=null;if(this.i[a]==$r){if(r&&e.aa()+4>e.getLength())return void(this.g=!0);l=(f=e.H())>>>24,f&=16777215}a=i+o,n&&a>e.getLength()&&(a=e.getLength()),r&&a>e.getLength()?this.g=!0:(r=a-e.aa(),c({name:s,parser:this,partialOkay:n||!1,version:l,flags:f,reader:e=new Lr(e=0>10))+String.fromCharCode(96+((960&t)>>5))+String.fromCharCode(96+(31&t))}}function ti(){this.j=new Map,this.i=this.h=0,this.g=ei}ti.prototype.init=function(t){function e(t){(t=t.name)in ii&&(n.g=ii[t])}var n=this,r=[],i=[];if((new Gr).box("moov",qr).box("mvex",qr).R("trex",(function(t){var e=t.reader;e.skip(4),e.skip(4),t=e.H(),e=e.H(),n.h=t,n.i=e})).box("trak",qr).R("tkhd",(function(t){var e=t.reader;1==(t=t.version)?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4));var n=e.H();1==t?e.skip(8):e.skip(4),e.skip(4),e.skip(8),e.skip(2),e.skip(2),e.skip(2),e.skip(2),e.skip(36),e.ab(),e.ab(),e.ab(),e.ab(),r.push(n)})).box("mdia",qr).R("mdhd",(function(t){t=Qr(t.reader,t.version),i.push(t.timescale)})).box("minf",qr).box("stbl",qr).R("stsd",zr).box("avc1",e).box("avc3",e).box("hev1",e).box("hvc1",e).box("dvh1",e).box("dvhe",e).box("encv",Kr).box("sinf",qr).box("frma",(function(t){(t=Xr(t=t.reader.H()))in ii&&(n.g=ii[t])})).parse(t,!0),!r.length||!i.length||r.length!=i.length)throw new Yt(2,2,2010);this.g==ei&&K("Unable to determine bitstream format for CEA parsing!"),r.forEach((function(t,e){n.j.set(t,i[e])}))},ti.prototype.parse=function(t){var e=this;if(this.g==ei)return[];var n=[],r=this.h,i=this.i,o=0,a=[],s=null,u=9e4;return(new Gr).box("moof",(function(t){o=t.start,a=[],qr(t)})).box("traf",qr).R("trun",(function(t){var e=t.reader,n=t.version;t=t.flags;var r=e.H(),i=[],o=null;1&t&&(o=e.H()),4&t&&e.skip(4);for(var s=0;s>1&63)||40==g;break;default:return}if(g)for(p=0,c>>32-n;return t.g-=n,0>>e)return t.h<<=e,t.g-=e,e;return fi(t),e+pi(t)}function gi(t){hi(t,1+pi(t))}function mi(t){return di(t,pi(t)+1)-1}function yi(t,e){for(var n=8,r=8,i=0;i>>1:-1*(r>>>1))+256)%256),n=0===r?n:r}function vi(t){return di(t,8),mi(t),mi(t)}function bi(){}function wi(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&255>t[e+3]&&255>t[e+4]&&128>t[e+6]&&128>t[e+7]&&128>t[e+8]&&128>t[e+9]}function Ei(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&255>t[e+3]&&255>t[e+4]&&128>t[e+6]&&128>t[e+7]&&128>t[e+8]&&128>t[e+9]}function Ti(t,e){var n=(127&t[e])<<21;return n|=(127&t[e+1])<<14,(n|=(127&t[e+2])<<7)|127&t[e+3]}function xi(t){var e={key:t.type,description:"",data:""};if("TXXX"===t.type){if(2>t.size||3!==t.data[0])return null;var n=t.data.subarray(1).indexOf(0);if(-1===n)return null;var r=Rr(rt(t.data,1,n));return t=Rr(rt(t.data,2+n)).replace(/\0*$/,""),e.description=r,e.data=t,e}return"WXXX"===t.type?2>t.size||3!==t.data[0]||-1===(n=t.data.subarray(1).indexOf(0))?null:(r=Rr(rt(t.data,1,n)),t=Rr(rt(t.data,2+n)).replace(/\0*$/,""),e.description=r,e.data=t,e):"PRIV"===t.type?2>t.size||-1===(r=t.data.indexOf(0))?null:(r=Rr(rt(t.data,0,r)),e.description=r,"com.apple.streaming.transportStreamTimestamp"==r?(r=t.data.subarray(r.length+1),t=1&r[3],r=(r[4]<<23)+(r[5]<<15)+(r[6]<<7)+r[7],r/=45,t&&(r+=47721858.84),e.data=r):(t=nt(t.data.subarray(r.length+1)),e.data=t),e):"T"===t.type[0]?2>t.size||3!==t.data[0]?null:(t=Rr(t.data.subarray(1)).replace(/\0*$/,""),e.data=t,e):"W"===t.type[0]?(t=Rr(t.data).replace(/\0*$/,""),e.data=t,e):t.data?(e.data=nt(t.data),e):null}function Ai(t){for(var e=0,n=[];wi(t,e);){var r=Ti(t,e+6);for(t[e+5]>>6&1&&(e+=10),r=(e+=10)+r;e+10>6&1&&(r+=10),r+=10,r+=Ti(t,e+6),Ei(t,e+10)&&(r+=10),e+=r;return 0t.byteLength-6)return null;var n=t[7];return 192&n&&(e.pts=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,e.dts=e.pts,64&n&&(e.dts=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)),n=t[8]+9,t.byteLength<=n?null:(e.data=t.subarray(n),e)}function Mi(t){return!(0>ji(t))}function ji(t){for(var e=Math.min(1e3,t.length-564),n=0;nt.length)return this;for(var e=Math.max(0,ji(t)),n=t.length-(t.length+e)%188,r=!1,i=e;i>4){var s=i+5+t[i+4];if(s==i+188)continue}else s=i+4;switch(a){case 0:o&&(s+=t[s]+1),this.u=(31&t[s+10])<<8|t[s+11];break;case 17:case 8191:break;case this.u:o&&(s+=t[s]+1),a={audio:-1,video:-1,rd:-1,audioCodec:"",videoCodec:""};var u=s+3+((15&(o=t)[s+1])<<8|o[s+2])-4;for(s+=12+((15&o[s+10])<<8|o[s+11]);s=o-1)return s;u=++f,c=31&i[f]}a=0}else a++;f>=o-1&&0<=u&&0<=a&&(l?(n.data=Ii(n.data,i),n.La=Ii(n.La,i)):(l=!0,n={data:i.subarray(u+1,o),La:i.subarray(u,o),type:c,time:r},e&&0==t.Md&&(o=(i=e.data).byteLength,f=-1)))}return n&&s.push(n),s},r.getMetadata=function(){for(var t=[],e=l(this.h),n=e.next();!n.done;n=e.next())(n=Li(n.value))&&t.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Ai(n.data),dts:n.dts,pts:n.pts});return t},r.jb=function(){for(var t=[],e=l(this.g),n=e.next();!n.done;n=e.next())(n=Li(n.value))&&t.push(n);return t},r.Jc=function(){for(var t=[],e=l(this.i),n=e.next();!n.done;n=e.next()){var r=Li(n=n.value);r&&null!=r.pts&&null!=r.dts?t.push(r):t.length&&(n=r?r.data:n)&&((r=t.pop()).data=Ii(r.data,n),t.push(r))}return t},r.getStartTime=function(){for(var t=null,e=l(this.jb()),n=e.next();!n.done;n=e.next()){var r=n.value;r&&null!=r.pts&&(r=Math.min(r.dts,r.pts)/9e4,null==t||t>r)&&(t=r)}for(e=null,n=(r=l(this.Jc())).next();!n.done;n=r.next())(n=n.value)&&null!=n.pts&&(n=Math.min(n.dts,n.pts)/9e4,null==e||e>n)&&(e=n);return{audio:t,video:e}},r.md=function(){return{audio:this.s,video:this.m}},r.qd=function(){var t=[];if("avc"!=this.m)return t;for(var e=this.Jc(),n=0;na?16:64)}}if(gi(e),0===(o=mi(e)))mi(e);else if(1===o)for(hi(e,1),gi(e),gi(e),o=mi(e),a=0;ar?s.setUint32(u,0):s.setUint32(u,16777216),u+=4,a.set(e,u),u+=e.length,0n.byteLength){n=[];break t}var o=rt(n,t,i);e.push({type:r,value:o}),t+=i}n=e}return n}(t=Ci(t.textContent)).filter((function(t){return t.type===lo}))[0],t&&(t=io(t=Cr(t.value,!0),"WRMHEADER"))?function(t){for(var e=(t=l(t.getElementsByTagName("DATA"))).next();!e.done;e=t.next())for(var n=(e=l(e.value.childNodes)).next();!n.done;n=e.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(t):""):""}function co(t){var e=t.getAttribute("schemeIdUri"),n=zi(t,"urn:mpeg:cenc:2013","default_KID"),r=qi(t,"urn:mpeg:cenc:2013","pssh").map(Ki);if(!e)return null;if(e=e.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new Yt(2,4,4009);var i=[];try{i=r.map((function(t){return{initDataType:"cenc",initData:Ci(t),keyId:null}}))}catch(o){throw new Yt(2,4,4007)}return{node:t,Td:e,keyId:n,init:0=t.l){if(!t.i)throw new Yt(2,7,1010);t.g=1,t.h=t.j}return e=t.g,t.g++,0==e?r.return():(n=t.h*(1+(2*Math.random()-1)*t.o),E(r,new Promise((function(t){new Ie(t).V(n/1e3)})),2))}t.h*=t.m,T(r)}))}function go(){var t,e,n=new Promise((function(n,r){t=n,e=r}));return n.resolve=t,n.reject=e,n}function mo(t,e){this.promise=t,this.i=e,this.g=!1}function yo(t){return new mo(Promise.reject(t),(function(){return Promise.resolve()}))}function vo(){var t=Promise.reject(new Yt(2,7,7001));return t.catch((function(){})),new mo(t,(function(){return Promise.resolve()}))}function bo(t){return new mo(Promise.resolve(t),(function(){return Promise.resolve()}))}function wo(t){return new mo(t,(function(){return t.catch((function(){}))}))}function Eo(t){return new mo(Promise.all(t.map((function(t){return t.promise}))),(function(){return Promise.all(t.map((function(t){return t.abort()})))}))}function To(e,n){if(n)if(n instanceof Map)for(var r=l(n.keys()),i=r.next();!i.done;i=r.next())i=i.value,Object.defineProperty(this,i,{value:n.get(i),writable:!0,enumerable:!0});else for(r in n)Object.defineProperty(this,r,{value:n[r],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=t.performance&&t.performance.now?t.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function xo(){this.ia=new ke,this.Ke=this}function Ao(t){var e=new Set;return function t(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(e.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;e.add(n);var i,o=r?[]:{};for(i in n)o[i]=t(n[i]);return r&&(o.length=n.length),o}}(t)}function So(t){var e,n={};for(e in t)n[e]=t[e];return n}function _o(){this.g=[]}function Oo(t,e){t.g.push(e.finally((function(){var n=t.g,r=n.indexOf(e);-1=i.priority)&&(jo[t]={priority:n,Wc:e,Tf:void 0!==r&&r})}function ko(t,e,n){return{uris:t,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:e,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function No(t,e,n,r,i,o,a){t.o&&(n.uris[i]=n.uris[i].replace("http://","https://"));var s=new Mt(n.uris[i]),u=s.za,c=!1;u||(jt(s,u=(u=location.protocol).slice(0,-1)),n.uris[i]=s.toString()),u=u.toLowerCase();var l=(u=jo[u])?u.Wc:null;if(!l)return yo(new Yt(2,1,1e3,s));var f,h=u.Tf,d=null,p=null,g=!1,m=!1;return wo(po(r)).ka((function(){if(t.i)return vo();f=Date.now();var r=l(n.uris[i],n,e,(function(n,r,i){d&&d.stop(),p&&p.V(s/1e3),t.l&&e==Lo&&(t.l(n,r),c=!0,a.g=i)}),(function(r){t.j&&t.j(r,n,e),m=!0}));if(!h)return r;var o=n.retryParameters.connectionTimeout;o&&(d=new Ie((function(){g=!0,r.abort()}))).V(o/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new Ie((function(){g=!0,r.abort()}))),r})).ka((function(r){d&&d.stop(),p&&p.stop(),null==r.timeMs&&(r.timeMs=Date.now()-f);var i={response:r,Ef:c};return!m&&t.j&&t.j(r.headers,n,e),i}),(function(s){if(d&&d.stop(),p&&p.stop(),t.s){var u=null,c=0;s instanceof Yt&&(u=s,1001==s.code&&(c=s.data[1])),t.s(n,u,c,g)}if(t.i)return vo();if(g&&(s=new Yt(1,1,1003,n.uris[i],e)),s instanceof Yt){if(7001==s.code)throw s;if(1010==s.code)throw o;if(1==s.severity)return u=new To("retry",u=(new Map).set("error",s)),t.dispatchEvent(u),i=(i+1)%n.uris.length,No(t,e,n,r,i,s,a)}throw s}))}function Io(){this.g=0}function Po(t,e,n){mo.call(this,t,e),this.h=n}go.prototype.resolve=function(){},go.prototype.reject=function(){},mo.prototype.abort=function(){return this.g=!0,this.i()},mo.prototype.finally=function(t){return this.promise.then((function(){return t(!0)}),(function(){return t(!1)})),this},mo.prototype.ka=function(t,e){function n(n){return function(s){if(i.g&&n)o.reject(a);else{var u=n?t:e;u?r=function(t,e,n){try{var r=t(e);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){}),(function(){}))})}catch(i){return n.reject(i),function(){return Promise.resolve()}}}(u,s,o):(n?o.resolve:o.reject)(s)}}}function r(){return o.reject(a),i.abort()}var i=this,o=new go,a=new Yt(2,7,7001);return this.promise.then(n(!0),n(!1)),new mo(o,(function(){return r()}))},F("shaka.util.AbortableOperation",mo),mo.prototype.chain=mo.prototype.ka,mo.prototype.finally=mo.prototype.finally,mo.all=Eo,mo.prototype.abort=mo.prototype.abort,mo.notAbortable=wo,mo.completed=bo,mo.aborted=vo,mo.failed=yo,To.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},To.prototype.stopImmediatePropagation=function(){this.g=!0},To.prototype.stopPropagation=function(){},F("shaka.util.FakeEvent",To),xo.prototype.addEventListener=function(t,e){this.ia&&this.ia.push(t,e)},xo.prototype.removeEventListener=function(t,e){this.ia&&this.ia.remove(t,e)},xo.prototype.dispatchEvent=function(t){if(!this.ia)return!0;var e=this.ia.get(t.type)||[],n=this.ia.get("All");for(n&&(e=e.concat(n)),n=(e=l(e)).next();!n.done;n=e.next()){n=n.value,t.target=this.Ke,t.currentTarget=this.Ke;try{n.handleEvent?n.handleEvent(t):n.call(this,t)}catch(r){}if(t.g)break}return t.defaultPrevented},xo.prototype.release=function(){this.ia=null},_o.prototype.destroy=function(){for(var t=[],e=l(this.g),n=e.next();!n.done;n=e.next())(n=n.value).promise.catch((function(){})),t.push(n.abort());return this.g=[],Promise.all(t)},y(Ro,xo),(r=Ro.prototype).Vd=function(t){this.o=t},r.Uf=function(t){this.g.add(t)},r.jg=function(t){this.g.delete(t)},r.Ve=function(){this.g.clear()},r.Vf=function(t){this.h.add(t)},r.kg=function(t){this.h.delete(t)},r.We=function(){this.h.clear()},r.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),xo.prototype.release.call(this),this.m.destroy()},r.request=function(t,e,n){var r=this,i=new Io;if(this.i){var o=Promise.reject(new Yt(2,7,7001));return o.catch((function(){})),new Po(o,(function(){return Promise.resolve()}),i)}e.method=e.method||"GET",e.headers=e.headers||{},e.retryParameters=e.retryParameters?Ao(e.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},e.uris=Ao(e.uris),o=function(t,e,n,r){function i(t){o=o.ka((function(){return n.body&&(n.body=nt(n.body)),t(e,n,r)}))}var o=bo(void 0);t.u&&i(t.u);for(var a=(t=l(t.g)).next();!a.done;a=t.next())i(a.value);return o.ka(void 0,(function(t){if(t instanceof Yt&&7001==t.code)throw t;throw new Yt(2,1,1006,t)}))}(this,t,e,n);var a=o.ka((function(){return No(r,t,e,new ho(e.retryParameters,!1),0,null,i)})),s=a.ka((function(e){return function(t,e,n,r){for(var i=bo(void 0),o={},a=(t=l(t.h)).next();!a.done;o={dd:o.dd},a=t.next())o.dd=a.value,i=i.ka(function(t){return function(){var i=n.response;return i.data&&(i.data=nt(i.data)),t.dd(e,i,r)}}(o));return i.ka((function(){return n}),(function(t){var e=2;if(t instanceof Yt){if(7001==t.code)throw t;e=t.severity}throw new Yt(e,1,1007,t)}))}(r,t,e,n)})),u=Date.now(),c=0;o.promise.then((function(){c=Date.now()-u}),(function(){}));var f=0;a.promise.then((function(){f=Date.now()}),(function(){}));var h=s.ka((function(n){var i=Date.now()-f,o=n.response;return o.timeMs+=c,o.timeMs+=i,n.Ef||!r.l||o.fromCache||"HEAD"==e.method||t!=Lo||r.l(o.timeMs,o.data.byteLength),o}),(function(t){throw t&&(t.severity=2),t}));return o=new Po(h.promise,(function(){return h.abort()}),i),Oo(this.m,o),o},F("shaka.net.NetworkingEngine",Ro),Ro.prototype.request=Ro.prototype.request,Ro.prototype.destroy=Ro.prototype.destroy,Ro.makeRequest=ko,Ro.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},Ro.prototype.clearAllResponseFilters=Ro.prototype.We,Ro.prototype.unregisterResponseFilter=Ro.prototype.kg,Ro.prototype.registerResponseFilter=Ro.prototype.Vf,Ro.prototype.clearAllRequestFilters=Ro.prototype.Ve,Ro.prototype.unregisterRequestFilter=Ro.prototype.jg,Ro.prototype.registerRequestFilter=Ro.prototype.Uf,Ro.unregisterScheme=function(t){delete jo[t]},Ro.registerScheme=Co,Ro.prototype.setForceHTTPS=Ro.prototype.Vd,Ro.NumBytesRemainingClass=Io,y(Po,mo),Ro.PendingRequest=Po;var Lo=1;Ro.RequestType={MANIFEST:0,SEGMENT:Lo,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6},Ro.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var Mo=3;Ro.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Mo};var jo={};function Do(e,n,r,i,o){var a={RepresentationID:n,Number:r,Bandwidth:i,Time:o};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(e,n,r,i){if("$$"==e)return"$";var o=a[n];if(null==o)return e;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&(o=Math.round(o)),i){case void 0:case"d":case"i":case"u":e=o.toString();break;case"o":e=o.toString(8);break;case"x":e=o.toString(16);break;case"X":e=o.toString(16).toUpperCase();break;default:e=o.toString()}return r=t.parseInt(r,10)||1,Array(Math.max(0,r-e.length)+1).join("0")+e}))}function Bo(t,e){var n=Uo(t,e,"timescale"),r=1;n&&(r=Qi(n)||1);var i=Uo(t,e,"duration");n=Qi(i||""),"image"==t.G.contentType&&(n=eo(i||"")),n&&(n/=r);var o=Uo(t,e,"startNumber");i=Number(Uo(t,e,"presentationTimeOffset"))||0;var a=to(o||"");if(null!=o&&null!=a||(a=1),o=Fo(t,e,"SegmentTimeline"),e=null,o){e=r,t=t.U.duration||1/0,o=Gi(o,"S");for(var s=[],u=-i,c=0;c(l=l||0))if(f){if(null==(f=Xi(f,"t",to)))break;if(h>=f)break;l=Math.ceil((f-h)/d)-1}else{if(1/0==t)break;if(h/e>=t)break;l=Math.ceil((t*e-h)/d)-1}for(0>>31;h&=2147483647;var p=a.reader.H();if(a.reader.skip(4),1==d)throw new Yt(2,3,3006);s.push(new Go(c/u+n,(c+p)/u+n,(function(){return o}),t,t+h-1,e,n,r,i)),c+=p,t+=h}return a.parser.stop(),s}(e,r,i,o,a,n,t)}));if(t&&u.parse(t),s)return s;throw new Yt(2,3,3004)}function Wo(t){this.g=t,this.l=null,this.i=0,this.m=!1}function Xo(t,e,n){return new Wo([new Go(t,t+e,(function(){return n}),0,null,null,t,t,t+e)])}function Yo(t,e,n){this.i=t,this.g=e,this.h=n}function Zo(){Wo.call(this,[]),this.h=[]}function $o(t){this.h=it(t),this.g=new Lr(this.h,0)}function Jo(t){var e=Qo(t);if(7=r.startTime&&t(t-=this.i)||t>=this.g.length?null:this.g[t]},r.offset=function(t){if(!this.m)for(var e=l(this.g),n=e.next();!n.done;n=e.next())n.value.offset(t)},r.Qc=function(t){if(!this.m&&t.length){var e=Math.round(1e3*t[0].startTime)/1e3;this.g=this.g.filter((function(t){return Math.round(1e3*t.startTime)/1e3e&&(0==n.g.length||t.endTime>n.g[0].startTime)})),this.Qc(t),this.Ka(e)},r.Ka=function(t){if(!this.m){var e=this.g.length;this.g=this.g.filter((function(e){return e.endTime>t})),this.i+=e-this.g.length}},r.dc=function(t,e,n){if(n=void 0!==n&&n,!this.m){for(;this.g.length&&this.g[this.g.length-1].startTime>=e;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=t;)this.g.shift(),n||this.i++;0!=this.g.length&&(t=this.g[this.g.length-1],this.g[this.g.length-1]=new Go(t.startTime,e,t.O,t.j,t.i,t.g,t.m,t.L,t.K,t.h,t.tilesLayout,t.I,t.D,t.status,t.C),this.g[this.g.length-1].o=t.o)}},r.Yc=function(t,e){var n=this;this.m||(this.l&&this.l.stop(),this.l=new Ie((function(){var t=e();t?n.g.push.apply(n.g,f(t)):(n.l.stop(),n.l=null)})),this.l.sa(t))},Wo.prototype[Symbol.iterator]=function(){return this.kb(0)},Wo.prototype.kb=function(t){var e=this.find(t);if(null==e)return null;e--;var n=this.get(e+1),r=-1;if(n&&0=o.startTime&&t=t.h.length&&(this.g++,this.h=0,t=this.i.get(this.g)),t&&0s()&&!n.length?null:n}))}return Promise.resolve(A)}(u,s,i,a,o)}};var c=null;r=r=null,t.ba.id&&t.G.id&&(r=n[r=t.ba.id+","+t.G.id])&&(c=r.segmentIndex);var f=t.U.start,h=t.U.duration?f+t.U.duration:1/0,d=!(t.Ya&&t.U.sd);return c?(ma(n=c,s,f,h,d),n.Ka(t.presentationTimeline.mb())):c=new ga(s,t.G.id,t.bandwidth,t.G.ta,f,h,a,d),s.timeline&&"image"!==t.$.contentType&&t.presentationTimeline.ye(s.timeline,f),r&&t.Ya&&(r.segmentIndex=c),{Eb:function(){return c instanceof ga&&0==c.fc()&&ma(c,s,f,h,d),Promise.resolve(c)}}}function pa(t){return t.tc}function ga(t,e,n,r,i,o,a,s){Wo.call(this,[]),this.h=t,this.C=e,this.s=n,this.u=r,this.j=i,this.o=o,this.A=a,s&&ya(this)}function ma(t,e,n,r,i){if(t.h){var o=(n=t.h.timeline)[n.length-1];0<(e=e.timeline.filter((function(t){return t.start>=o.end}))).length&&t.h.timeline.push.apply(t.h.timeline,f(e)),t.o!==r&&(t.o=r)}else t.h=e,t.j=n,t.o=r;i&&ya(t)}function ya(t){if(!t.m){for(var e=t.h.timeline;e.length&&e[e.length-1].start>=t.o;)e.pop();t.Ka(t.j),0!==e.length&&1/0!==t.o&&(e[e.length-1].end=t.o-t.j)}}function va(){}function ba(t,e,n){var r,i,o;return I((function(a){return 1==a.g?((r=ko([t],n)).method="HEAD",E(a,e.request(0,r).promise,2)):(i=a.h,o=i.headers["content-type"],a.return(o?o.toLowerCase().split(";").shift():""))}))}function wa(t){return 1==(t=new Mt(t).va.split("/").pop().split(".")).length?"":t.pop().toLowerCase()}y(ga,Wo),(r=ga.prototype).fc=function(){return this.h?this.h.timeline.length:0},r.release=function(){Wo.prototype.release.call(this),this.h=null},r.Ka=function(t){if(this.h){for(var e=0,n=this.h.timeline,r=0;r=e&&(this.g=this.g.slice(e)),this.i+=e,0===this.fc()&&this.release())}},r.find=function(t){if(this.h&&this.h.timeline&&this.h.timeline.length&&tthis.o)return null;for(var n=e.length-1,r=0;r=o&&tn||n>=this.fc()||!this.h)return null;var r=this.g[n];if(!r){r=this.h.timeline[n];var i=t+this.h.Pb,o=this.h.ae+r.be;r=new Go(this.j+r.start,this.j+r.end,(function(){return e.h?function(t,e,n,r,i,o){return t=Do(t,e,n,r||null,i),te(o,[t]).map((function(t){return t.toString()}))}(e.h.Dd,e.C,i,e.s,o,e.u):[]}),0,null,this.A,this.j-this.h.Ta,this.j,this.o),this.g[n]=r}return r},F("shaka.media.ManifestParser",va),va.unregisterParserByMime=function(t){delete Ea[t]},va.registerParserByMime=function(t,e){Ea[t]=e},va.registerParserByExtension=function(t,e){Ta[t]=e},va.AccessibilityPurpose={tg:"visually impaired",pg:"hard of hearing"};var Ea={},Ta={};function xa(t,e,n){this.i=t,this.u=e,this.o=this.j=1/0,this.g=1,this.h=this.l=null,this.m=0,this.C=!0,this.D=0,this.s=void 0===n||n,this.F=0,this.A=!1}function Aa(t,e,n,r,i){return t=ko(t,r,i),0==e&&null==n||(t.headers.Range=n?"bytes="+e+"-"+n:"bytes="+e+"-"),t}function Sa(t){this.g=!1,this.h=new go,this.i=t}function _a(t,e){if(t.g){if(e instanceof Yt&&7003==e.code)throw e;throw new Yt(2,7,7003,e)}}function Oa(){this.g=new ke}function Ra(t,e,n,r){this.target=t,this.type=e,this.listener=n,this.g=function(t,e){if(null==e)return!1;if("boolean"==typeof e)return e;var n=new Set(["passive","capture"]);return Object.keys(e).filter((function(t){return!n.has(t)})),function(t){var e=Ca;if(null==e){e=!1;try{var n={},r={get:function(){return e=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},t.addEventListener("test",r,n),t.removeEventListener("test",r,n)}catch(i){e=!1}Ca=e}return e||!1}(t)?e:e.capture||!1}(t,r),this.target.addEventListener(e,n,this.g)}(r=xa.prototype).getDuration=function(){return this.j},r.pf=function(){return this.g},r.eg=function(t){this.i=t},r.Va=function(t){this.j=t},r.uf=function(){return this.i},r.He=function(t){this.m=t},r.Yd=function(t){this.C=t},r.Xd=function(t){this.o=t},r.cg=function(t){this.u=t},r.ff=function(){return this.u},r.ye=function(t,e){if(0!=t.length){var n=t[t.length-1].end+e;this.Sc(t[0].start+e),this.g=t.reduce((function(t,e){return Math.max(t,e.end-e.start)}),this.g),this.h=Math.max(this.h,n),null!=this.i&&this.s&&!this.A&&(this.i=(Date.now()+this.m)/1e3-this.h-this.g)}},r.Hd=function(t){if(0!=t.length){for(var e=t[0].startTime,n=t[0].endTime,r=(Date.now()+this.m)/1e3,i=(t=l(t)).next();!i.done;i=t.next())r<(i=i.value).startTime||(e=Math.min(e,i.startTime),n=Math.max(n,i.endTime),this.g=Math.max(this.g,i.endTime-i.startTime));this.Sc(e),this.h=Math.max(this.h,n),null!=this.i&&this.s&&!this.A&&(this.i=r-this.h-this.g)}},r.zd=function(){this.A=!0},r.Sc=function(t){this.l=null==this.l?t:Math.min(this.l,t)},r.Gd=function(t){this.g=Math.max(this.g,t)},r.offset=function(t){null!=this.l&&(this.l+=t),null!=this.h&&(this.h+=t)},r.T=function(){return 1/0==this.j&&!this.C},r.Hb=function(){return 1/0!=this.j&&!this.C},r.mb=function(){return Math.max(this.D,this.lb()-this.o)},r.Je=function(t){this.D=t},r.lb=function(){return this.T()||this.Hb()?Math.min(Math.max(0,(Date.now()+this.m)/1e3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j},r.hc=function(t){var e=Math.max(this.l,this.D);return 1/0==this.o?Math.ceil(1e3*e)/1e3:Math.max(e,Math.min(this.lb()-this.o+t,this.Na()))},r.Fb=function(){return this.hc(0)},r.Na=function(){return Math.max(0,this.lb()-(this.T()||this.Hb()?this.u:0))},r.Oe=function(){return!(null==this.i||null!=this.h&&this.s)},r.Ge=function(t){this.F=t},F("shaka.media.PresentationTimeline",xa),xa.prototype.setAvailabilityTimeOffset=xa.prototype.Ge,xa.prototype.usingPresentationStartTime=xa.prototype.Oe,xa.prototype.getSeekRangeEnd=xa.prototype.Na,xa.prototype.getSeekRangeStart=xa.prototype.Fb,xa.prototype.getSafeSeekRangeStart=xa.prototype.hc,xa.prototype.getSegmentAvailabilityEnd=xa.prototype.lb,xa.prototype.setUserSeekStart=xa.prototype.Je,xa.prototype.getSegmentAvailabilityStart=xa.prototype.mb,xa.prototype.isInProgress=xa.prototype.Hb,xa.prototype.isLive=xa.prototype.T,xa.prototype.offset=xa.prototype.offset,xa.prototype.notifyMaxSegmentDuration=xa.prototype.Gd,xa.prototype.notifyMinSegmentStartTime=xa.prototype.Sc,xa.prototype.lockStartTime=xa.prototype.zd,xa.prototype.notifySegments=xa.prototype.Hd,xa.prototype.notifyTimeRange=xa.prototype.ye,xa.prototype.getDelay=xa.prototype.ff,xa.prototype.setDelay=xa.prototype.cg,xa.prototype.setSegmentAvailabilityDuration=xa.prototype.Xd,xa.prototype.setStatic=xa.prototype.Yd,xa.prototype.setClockOffset=xa.prototype.He,xa.prototype.getPresentationStartTime=xa.prototype.uf,xa.prototype.setDuration=xa.prototype.Va,xa.prototype.setPresentationStartTime=xa.prototype.eg,xa.prototype.getMaxSegmentDuration=xa.prototype.pf,xa.prototype.getDuration=xa.prototype.getDuration,Sa.prototype.destroy=function(){var t=this;return this.g?this.h:(this.g=!0,this.i().then((function(){t.h.resolve()}),(function(){t.h.resolve()})))},(r=Oa.prototype).release=function(){this.Nb(),this.g=null},r.J=function(t,e,n,r){this.g&&(t=new Ra(t,e,n,r),this.g.push(e,t))},r.oa=function(t,e,n,r){var i=this;this.J(t,e,(function r(o){i.uc(t,e,r),n(o)}),r)},r.uc=function(t,e,n){if(this.g)for(var r=this.g.get(e)||[],i=(r=l(r)).next();!i.done;i=r.next())(i=i.value).target!=t||n!=i.listener&&n||(i.uc(),this.g.remove(e,i))},r.Nb=function(){if(this.g){var t,e=this.g,n=[];for(t in e.g)n.push.apply(n,f(e.g[t]));for(n=(e=l(n)).next();!n.done;n=e.next())n.value.uc();this.g.g={}}},F("shaka.util.EventManager",Oa),Oa.prototype.removeAll=Oa.prototype.Nb,Oa.prototype.unlisten=Oa.prototype.uc,Oa.prototype.listenOnce=Oa.prototype.oa,Oa.prototype.listen=Oa.prototype.J,Oa.prototype.release=Oa.prototype.release,Ra.prototype.uc=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Ca=void 0;function ka(t){for(var e=new Map,n=l(Object.keys(t)),r=n.next();!r.done;r=n.next())r=r.value,e.set(r,t[r]);return e}function Na(t){var e={};return t.forEach((function(t,n){e[n]=t})),e}function Ia(t,e){if(!t&&!e)return!0;if(t&&!e||e&&!t)return!1;if(t.size!=e.size)return!1;for(var n=(t=l(t)).next();!n.done;n=t.next()){var r=l(n.value);if(n=r.next().value,r=r.next().value,!e.has(n))return!1;if((n=e.get(n))!=r||null==n)return!1}return!0}function Pa(t,e){var n=this;e=void 0===e?1:e,this.C=t,this.F=new Set,this.m=this.s=null,this.ha=!1,this.I=0,this.g=null,this.u=new Oa,this.i=new Map,this.A=new Map,this.l=new go,this.h=null,this.o=function(e){2==e.severity&&n.l.reject(e),t.onError(e)},this.P=new Map,this.ia=new Map,this.W=new Ie((function(){return function(t){var e=t.P,n=t.ia;n.clear(),e.forEach((function(t,e){return n.set(e,t)})),e=Array.from(n.values()),e.length&&e.every((function(t){return"expired"==t}))&&t.o(new Yt(2,6,6014)),t.C.ze(Na(n))}(n)})),this.ca=!1,this.L=[],this.O=!1,this.ja=new Ie((function(){!function(t){t.i.forEach((function(e,n){var r=e.Jd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(t.C.onExpirationUpdated(n.sessionId,i),e.Jd=i)}))}(n)})).sa(e),this.l.catch((function(){})),this.j=new Sa((function(){return function(t){return I((function(e){switch(e.g){case 1:return t.u.release(),t.u=null,t.l.reject(),t.ja.stop(),t.ja=null,t.W.stop(),t.W=null,E(e,Va(t),2);case 2:if(!t.m){e.B(3);break}return x(e,4),E(e,t.m.setMediaKeys(null),6);case 6:A(e,5);break;case 4:S(e);case 5:t.m=null;case 3:t.g=null,t.F.clear(),t.s=null,t.A=new Map,t.h=null,t.o=function(){},t.C=null,t.Z=!1,t.D=null,T(e)}}))}(n)})),this.Z=!1,this.K=this.D=null}function La(e,n,r){e.A=new Map;for(var i=(r=l(r)).next();!i.done;i=r.next())e.A.set(i.value,{initData:null,initDataType:null});for(i=(r=l(e.h.persistentSessionsMetadata)).next();!i.done;i=r.next())i=i.value,e.A.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.ca=0r&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}t.o(new Yt(2,6,6006,e.message,e,r))}}))}(t,e,n,t.g.sessionType)}}function Da(t){return!!t&&!!t.match(/^com\.(microsoft|chromecast)\.playready/)}function Ba(t){za(t)&&t.l.resolve()}function Ua(t,e){new Ie((function(){e.loaded=!0,Ba(t)})).V(Ya)}function Fa(t,e){var n,r,i,o,a,s,u,c,f,h,d,p;I((function(g){switch(g.g){case 1:if(n=e.target,t.h.logLicenseExchange&&Ri(e.message),r=t.i.get(n),i=t.g.licenseServerUri,o=t.h.advanced[t.g.keySystem],"individualization-request"==e.messageType&&o&&o.individualizationServer&&(i=o.individualizationServer),(a=ko([i],t.h.retryParameters)).body=e.message,a.method="POST",a.licenseRequestType=e.messageType,a.sessionId=n.sessionId,a.drmInfo=t.g,r&&(a.initData=r.initData,a.initDataType=r.initDataType),Da(t.g.keySystem)){var m=Cr(a.body,!0,!0);if(m.includes("PlayReadyKeyMessage")){for(var y=l((m=io(m,"PlayReadyKeyMessage")).getElementsByTagName("HttpHeader")),v=y.next();!v.done;v=y.next())v=v.value,a.headers[v.getElementsByTagName("name")[0].textContent]=v.getElementsByTagName("value")[0].textContent;a.body=Ci(m.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}return s=Date.now(),x(g,2),E(g,t.C.mc.request(2,a).promise,4);case 4:u=g.h,A(g,3);break;case 2:return c=S(g),f=new Yt(2,6,6007,c),t.o(f),r&&r.cb&&r.cb.reject(f),g.return();case 3:return t.j.g?g.return():(t.I+=(Date.now()-s)/1e3,t.h.logLicenseExchange&&Ri(u.data),x(g,5),E(g,n.update(u.data),7));case 7:A(g,6);break;case 5:return h=S(g),d=new Yt(2,6,6008,h.message),t.o(d),r&&r.cb&&r.cb.reject(d),g.return();case 6:if(t.j.g)return g.return();p=new To("drmsessionupdate"),t.C.onEvent(p),r&&(r.cb&&r.cb.resolve(),Ua(t,r)),T(g)}}))}function Ha(t,e){e=e.target;var n=t.i.get(e),r=!1;e.keyStatuses.forEach((function(e,i){if("string"==typeof i){var o=i;i=e,e=o}if(Da(t.g.keySystem)&&16==i.byteLength&&(Me()||Fe())){var a=(o=it(i)).getUint32(0,!0),s=o.getUint16(4,!0),u=o.getUint16(6,!0);o.setUint32(0,a,!1),o.setUint16(4,s,!1),o.setUint16(6,u,!1)}"status-pending"!=e&&(n.loaded=!0),"expired"==e&&(r=!0),i=Ni(i).slice(0,32),t.P.set(i,e)}));var i=e.expiration-Date.now();(0>i||r&&1e3>i)&&n&&!n.cb&&(t.i.delete(e),e.close().catch((function(){}))),za(t)&&(t.l.resolve(),t.W.V(Za))}function Va(t){var e;return I((function(n){return e=Array.from(t.i.entries()),t.i.clear(),E(n,Promise.all(e.map((function(e){var n=(e=l(e)).next().value,r=e.next().value;return I((function(e){return 1==e.g?(x(e,2),t.A.has(n.sessionId)||"persistent-license"!==r.type||t.h.persistentSessionOnlinePlayback?E(e,function(t){var e;return I((function(n){return 1==n.g?(e=new Promise((function(t,e){new Ie(e).V(Xa)})),x(n,2),E(n,Promise.race([Promise.all([t.close(),t.closed]),e]),4)):2!=n.g?A(n,0):(S(n),void T(n))}))}(n),5):E(e,n.remove(),5)):2!=e.g?A(e,0):(S(e),void T(e))}))}))),0)}))}function Ga(t,e){if(!t.length)return e;if(!e.length)return t;for(var n=[],r=(t=l(t)).next();!r.done;r=t.next()){r=r.value;for(var i={},o=l(e),a=o.next();!a.done;i={ya:i.ya},a=o.next())if(a=a.value,r.keySystem==a.keySystem){i.ya=[],i.ya=i.ya.concat(r.initData||[]),i.ya=i.ya.concat(a.initData||[]),i.ya=i.ya.filter(function(t){return function(e,n){return void 0===e.keyId||n===t.ya.findIndex((function(t){return t.keyId===e.keyId}))}}(i)),o=r.keyIds&&a.keyIds?new Set([].concat(f(r.keyIds),f(a.keyIds))):r.keyIds||a.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||a.persistentStateRequired,videoRobustness:r.videoRobustness||a.videoRobustness,audioRobustness:r.audioRobustness||a.audioRobustness,serverCertificate:r.serverCertificate||a.serverCertificate,serverCertificateUri:r.serverCertificateUri||a.serverCertificateUri,initData:i.ya,keyIds:o});break}}return n}function qa(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[])}function za(t){return function(t,e){for(var n=(t=l(t)).next();!n.done;n=t.next())if(!e(n.value))return!1;return!0}(t=t.i.values(),(function(t){return t.loaded}))}function Ka(t,e,n,r,i,o){for(var a={},s=(t=l(t)).next();!s.done;a={ma:a.ma},s=t.next()){if(a.ma=s.value,e.includes(a.ma.licenseServerUri)||e.push(a.ma.licenseServerUri),r.includes(a.ma.serverCertificateUri)||r.push(a.ma.serverCertificateUri),a.ma.serverCertificate&&(n.some(function(t){return function(e){return tt(e,t.ma.serverCertificate)}}(a))||n.push(a.ma.serverCertificate)),a.ma.initData){s={};for(var u=l(a.ma.initData),c=u.next();!c.done;s={wc:s.wc},c=u.next())s.wc=c.value,i.some(function(t){return function(e){var n=t.wc;return!(!e.keyId||e.keyId!=n.keyId)||e.initDataType==n.initDataType&&tt(e.initData,n.initData)}}(s))||i.push(s.wc)}if(a.ma.keyIds)for(u=(s=l(a.ma.keyIds)).next();!u.done;u=s.next())o.add(u.value)}}function Wa(e,n,r,i){var o=e.keySystem;!o||"org.w3.clearkey"==o&&e.licenseServerUri||(n.size&&(n=n.get(o)||"",e.licenseServerUri=n),e.keyIds||(e.keyIds=new Set),(r=r.get(o))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=r.persistentStateRequired),e.videoRobustness||(e.videoRobustness=r.videoRobustness),e.audioRobustness||(e.audioRobustness=r.audioRobustness),e.serverCertificate||(e.serverCertificate=r.serverCertificate),r.sessionType&&(e.sessionType=r.sessionType),e.serverCertificateUri||(e.serverCertificateUri=r.serverCertificateUri)),i[o]&&(e.keySystem=i[o]),t.cast&&t.cast.__platform__&&"com.microsoft.playready"==o&&(e.keySystem="com.chromecast.playready"))}(r=Pa.prototype).destroy=function(){return this.j.destroy()},r.configure=function(t){this.h=t},r.Xb=function(t){var e=this;return I((function(n){if(1==n.g)return e.s?(e.m=t,e.u.oa(e.m,"play",(function(){for(var t=l(e.L),n=t.next();!n.done;n=t.next())Fa(e,n.value);e.O=!0,e.L=[]})),"webkitCurrentPlaybackTargetIsWireless"in e.m&&e.u.J(e.m,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Va(e)})),e.K=e.g&&e.g.initData.find((function(t){return 0=n?i.push(new Set(e[o])):i.push(new Set);a=l(t),s=a.next();case 2:if(s.done){S.B(4);break}return E(S,function(t,e,n,r,i){return I((function(o){return 1==o.g?(os(e,t),t.matchedStreams?t.segmentIndex?E(o,ts(t,n),2):o.B(2):o.return(!1)):(ns(t,n,r,i),o.return(!0))}))}(s.value,e,n,A,i),5);case 5:if(!S.h)throw new Yt(2,4,4037);s=a.next(),S.B(2);break;case 4:for(u=l(i),c=u.next();!c.done;c=u.next())for(f=c.value,h=l(f),d=h.next();!d.done;d=h.next())p=d.value,(g=es(p,e,x,A,i))&&t.push(g);for(m=l(i),c=m.next();!c.done;c=m.next())for(y=c.value,v={},b=l(y),d=b.next();!d.done;v={Xa:v.Xa},d=b.next())if(v.Xa=d.value,w=v.Xa.type==r.da&&!v.Xa.language,T=v.Xa.type==r.fd&&!v.Xa.tilesLayout,!w&&!T&&t.some(function(t){return function(e){return e.mimeType==t.Xa.mimeType&&fe(e.codecs)==fe(t.Xa.codecs)}}(v)))throw new Yt(2,4,4037);return S.return(t)}}))}function ts(t,e){var n,r,i,o,a,s,u;return I((function(c){if(1==c.g){for(n=[],r=t.matchedStreams,i=l(r),o=i.next();!o.done;o=i.next())a=o.value,n.push(a.createSegmentIndex()),a.trickModeVideo&&!a.trickModeVideo.segmentIndex&&n.push(a.trickModeVideo.createSegmentIndex());return E(c,Promise.all(n),2)}if(t.segmentIndex instanceof Zo)for(s=e;s=e){var a=i[o];n(t,a);var s=!0;"audio"==t.type&&0==Se(t.language,a.language)&&(s=!1),s&&r[o].delete(a)}}function rs(t){var e=Object.assign({},t);return e.originalId=null,e.createSegmentIndex=function(){return Promise.resolve()},e.closeSegmentIndex=function(){if(e.segmentIndex&&(e.segmentIndex.release(),e.segmentIndex=null),e.matchedStreams)for(var t=l(e.matchedStreams),n=t.next();!n.done;n=t.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},e.segmentIndex=null,e.emsgSchemeIdUris=[],e.keyIds=new Set,e.closedCaptions=null,e.trickModeVideo=null,e}function is(t,e){var n,r;t.roles=Array.from(new Set(t.roles.concat(e.roles))),e.emsgSchemeIdUris&&(t.emsgSchemeIdUris=Array.from(new Set(t.emsgSchemeIdUris.concat(e.emsgSchemeIdUris)))),t.keyIds=(n=t.keyIds,r=e.keyIds,new Set([].concat(f(n),f(r)))),null==t.originalId?t.originalId=e.originalId:t.originalId+=","+(e.originalId||"");var i=Ga(t.drmInfos,e.drmInfos);if(e.drmInfos.length&&t.drmInfos.length&&!i.length)throw new Yt(2,4,4038);if(t.drmInfos=i,t.encrypted=t.encrypted||e.encrypted,e.closedCaptions){t.closedCaptions||(t.closedCaptions=new Map);for(var o=(i=l(e.closedCaptions)).next();!o.done;o=i.next()){var a=l(o.value);o=a.next().value,a=a.next().value,t.closedCaptions.set(o,a)}}e.trickModeVideo?(t.trickModeVideo||(t.trickModeVideo=rs(e.trickModeVideo),t.trickModeVideo.createSegmentIndex=function(){return t.trickModeVideo.segmentIndex=t.segmentIndex.clone(),Promise.resolve()}),is(t.trickModeVideo,e.trickModeVideo)):t.trickModeVideo&&is(t.trickModeVideo,e)}function os(t,e){for(var n=[],r=(t=l(t)).next();!r.done;r=t.next()){for(var i=e,o={audio:as,video:as,text:ss,image:us}[i.type],a={audio:cs,video:ls,text:fs,image:hs}[i.type],s=null,u=(r=l(r.value)).next();!u.done;u=r.next())!o(i,u=u.value)||s&&!a(i,s,u)||(s=u);if(!(i=s))return;n.push(i)}e.matchedStreams=n}function as(t,e){function n(t){if(!bs.has(t)){var e=fe(t);bs.set(t,e)}return bs.get(t)}return!(e.mimeType!=t.mimeType||n(e.codecs)!=n(t.codecs)||t.drmInfos&&!function(t,e){return!t.length||!e.length||t===e||0r||!(ir.length||!(i.lengthr)return!0;if(ir.length)return!0;if(i.lengtht){if(n<=t||n-te-t)return vs}else{if(n>t)return vs;if(t-nt-e)return vs}return ys}function gs(t,e,n){return e=Math.abs(t-e),(t=Math.abs(t-n))t.A)&&(t.A=l),a=xs(t,e,n,{start:l,duration:d,node:u,sd:null==d||!c}),o.push(a),e.ba.id&&d&&(t.L[e.ba.id]=d),null==d){a=null;break}a=l+d}}return t.K=o.map((function(t){return t.id})),null!=i?{periods:o,duration:i,le:!1}:{periods:o,duration:a,le:!0}}(t,P,c,e),M=L.duration,j=L.periods,"static"!=w&&L.le||_.Va(M||1/0),t.m&&!t.s&&t.h.isAutoLowLatencyMode()&&(t.h.enableLowLatencyMode(),t.s=t.h.isLowLatencyMode()),t.s?_.Ge(t.m):t.m&&K("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),_.Gd(b||1),E(U,t.j.ie(j,P.Ya),2);case 2:if(t.s&&(d=0),t.s&&t.m&&(t.C=t.m),t.i){t.i.variants=t.j.j,t.i.textStreams=t.j.pd(),t.i.imageStreams=t.j.h,t.h.filter(t.i),U.B(3);break}var F=_,H=t.j.j,V=t.j.pd(),G=t.j.h,q=d||0,z=t.g.dash.sequenceMode,W=Hi(e,"ServiceDescription");if(W){var X=Hi(W,"Latency");W=Hi(W,"PlaybackRate"),X&&X.getAttribute("max")||W?X={maxLatency:X=X&&X.getAttribute("max")?parseInt(X.getAttribute("max"),10)/1e3:null,maxPlaybackRate:W=W?parseFloat(W.getAttribute("max")):null}:X=null}else X=null;if(t.i={presentationTimeline:F,variants:H,textStreams:V,imageStreams:G,offlineSessionIds:[],minBufferTime:q,sequenceMode:z,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:X},!_.Oe()){U.B(4);break}return D=Gi(e,"UTCTiming"),E(U,function(t,e,n){var r,i,o,a,s,u,c,f;return I((function(h){switch(h.g){case 1:r=n.map((function(t){return{scheme:t.getAttribute("schemeIdUri"),value:t.getAttribute("value")}})),i=t.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),o=l(r),a=o.next();case 2:if(a.done){h.B(4);break}switch(s=a.value,x(h,5),u=s.scheme,c=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return h.B(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return h.B(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return f=Date.parse(c),h.return(isNaN(f)?0:f-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":K("NTP UTCTiming scheme is not supported");break;default:K("Unrecognized scheme in UTCTiming element",u)}h.B(9);break;case 7:return E(h,Os(t,e,c,"HEAD"),10);case 10:return h.return(h.h);case 8:return E(h,Os(t,e,c,"GET"),11);case 11:return h.return(h.h);case 9:A(h,3);break;case 5:S(h);case 3:a=o.next(),h.B(2);break;case 4:return K("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),h.return(0)}}))}(t,c,D),5);case 5:if(B=U.h,!t.h)return U.return();_.He(B);case 4:_.zd();case 3:t.h.makeTextStreamsForClosedCaptions(t.i),T(U)}}))}function xs(t,e,n,r){e.ba=_s(r.node,null,n),e.U=r,e.ba.Db=e.Db,e.ba.id||(e.ba.id="__shaka_period_"+r.start);var i=Gi(r.node,"EventStream");n=e.presentationTimeline.mb();for(var o=(i=l(i)).next();!o.done;o=i.next())Rs(t,r.start,r.duration,o.value,n);if(n=Gi(r.node,"AdaptationSet").map((function(n){return function(t,e,n){function r(t){switch(t){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}e.$=_s(n,e.ba,null);var i,o=!1,a=Gi(n,"Role"),s=a.map((function(t){return t.getAttribute("value")})).filter(Qt),u=void 0,c=e.$.contentType==ie;c&&(u="subtitle");for(var h=(a=l(a)).next();!h.done;h=a.next()){var d=(h=h.value).getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(h=h.getAttribute("value"),h){case"main":o=!0;break;case"caption":case"subtitle":u=h}}d=Gi(n,"EssentialProperty"),a=null,h=!1;for(var p=(d=l(d)).next();!p.done;p=d.next()){var g=(p=p.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==g?a=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==g?i=r(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=g&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=g&&(h=!0)}for(d=l(d=Gi(n,"SupplementalProperty")),p=d.next();!p.done;p=d.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(p=p.value).getAttribute("schemeIdUri")&&(i=r(parseInt(p.getAttribute("value"),10)));d=Gi(n,"Accessibility");var m,y=new Map;for(d=l(d),p=d.next();!p.done;p=d.next())if(g=p.value,p=g.getAttribute("schemeIdUri"),g=g.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=g)for(var v=l(g=g.split(";")),b=v.next();!b.done;b=v.next()){var w=b.value,x=b=void 0;w.includes("=")?(b=(w=w.split("="))[0].startsWith("CC")?w[0]:"CC"+w[0],x=w[1]||"und"):(b="CC"+p,2==g.length?p+=2:p++,x=w),y.set(b,Ae(x))}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=g)for(g=l(g.split(";")),b=g.next();!b.done;b=g.next())b=b.value,w=v=void 0,b.includes("=")?(b=b.split("="),v="svc"+b[0],w=b[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,w=b),y.set(v,Ae(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=g&&(s.push(g),"captions"==g&&(u="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==g?m="visually impaired":"2"==g&&(m="hard of hearing"));if(h)return null;h=Gi(n,"ContentProtection");var A=so(h,t.g.dash.ignoreDrmInfo,t.g.dash.keySystemsByURI),S=Ae(e.$.language||"und"),_=n.getAttribute("label");if((h=Gi(n,"Label"))&&h.length&&(h=h[0],h.textContent&&(_=h.textContent)),h=Gi(n,"Representation"),n=h.map((function(n){return(n=function(t,e,r,i,o,a,s,u,c,l,f){if(e.G=_s(l,e.$,null),t.m=Math.min(t.m,e.G.Db),!function(t){var e=t.sc?1:0;return e+=t.bb?1:0,e+=t.tc?1:0,0==e?t.contentType==ie||"application"==t.contentType:(1!=e&&(t.sc&&(t.bb=null),t.tc=null),!0)}(e.G))return null;var h=e.U.start;e.bandwidth=Xi(l,"bandwidth",Qi)||0;var d=e.G.contentType,p=d==ie||"application"==d;d="image"==d;try{var g=function(e,n,r,i){return function(t,e,n,r,i){var o,a,s,u,c,l;return I((function(f){return 1==f.g?(o=Lo,a=i?0:1,s=Aa(e,n,r,t.g.retryParameters),u=t.h.networkingEngine,c=u.request(o,s,{type:a}),Oo(t.u,c),E(f,c.promise,2)):(l=f.h,f.return(l.data))}))}(t,e,n,r,i)};if(e.G.sc)var m=oa(e,g);else if(e.G.bb)m=fa(e,t.l);else if(e.G.tc)m=da(e,g,t.l,!!t.i,t.g.dash.initialSegmentLimit,t.L);else{var y=e.G.ta,v=e.U.duration||0;m={Eb:function(){return Promise.resolve(Xo(h,v,y))}}}}catch(n){if((p||d)&&4002==n.code)return null;throw n}g=Gi(l,"ContentProtection"),g=function(t,e,n,r){var i=so(t,n,r);if(e.ne)t=1==e.drmInfos.length&&!e.drmInfos[0].keySystem,n=0==i.drmInfos.length,(0==e.drmInfos.length||t&&!n)&&(e.drmInfos=i.drmInfos),e.ne=!1;else if(0t.C||t.D.V(Math.max(t.C-e,V(t.F)))}function _s(t,e,n){e=e||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Tc:null,audioSamplingRate:null,Db:0},n=n||e.ta;for(var r=Gi(t,"BaseURL"),i=r.map(Ki),o=t.getAttribute("contentType")||e.contentType,a=t.getAttribute("mimeType")||e.mimeType,s=t.getAttribute("codecs")||e.codecs,u=Xi(t,"frameRate",ro)||e.frameRate,c=t.getAttribute("sar")||e.pixelAspectRatio,f=Gi(t,"InbandEventStream"),h=e.emsgSchemeIdUris.slice(),d=(f=l(f)).next();!d.done;d=f.next())d=d.value.getAttribute("schemeIdUri"),h.includes(d)||h.push(d);f=function(t){for(var e=(t=l(t)).next();!e.done;e=t.next()){var n=e.value;if((e=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(e){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(e=parseInt(n,10)))continue;return e;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(e=parseInt(n,16)))continue;for(t=0;e;)1&e&&++t,e>>=1;return t;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(e=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0>32),t.setUint32(12,4294967295&n)):t.setUint32(0,n))}var Zs=new _r((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function $s(t){return!t||1==t.length&&1e-6>t.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function Js(t,e){return!(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)||e>t.end(t.length-1))&&e>=t.start(0)}function Qs(t,e){if(!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0))return 0;for(var n=0,r=(t=l(tu(t))).next();!r.done;r=t.next()){var i=r.value;r=i.start,(i=i.end)>e&&(n+=i-Math.max(r,e))}return n}function tu(t){if(!t)return[];for(var e=[],n=0;nn.end-.5)){e=!0;break t}e=!1}return e}function iu(t,e,n,r,i){var o=this;this.u=i,this.g=t,this.A=e,this.s=n,this.l=new Oa,this.j=!1,this.D=t.readyState,this.C=this.i=0,this.h=r,this.o=!1,this.l.J(t,"waiting",(function(){return ou(o)})),this.m=new Ie((function(){ou(o)})).sa(this.s.gapJumpTimerTime)}function ou(t){if(0!=t.g.readyState){if(t.g.seeking){if(!t.j)return}else t.j=!1;if(!t.g.paused||t.g.currentTime==t.i&&(t.g.autoplay||t.g.currentTime!=t.i)){var e;if(t.g.readyState!=t.D&&(t.D=t.g.readyState),!(e=!t.h)){var n=(e=t.h).j,r=ru(n),i=n.g.currentTime,o=Date.now()/1e3;e.g==i&&e.s==r||(e.m=o,e.g=i,e.s=r,e.h=!1),(r=(i=o-e.m)>=e.u&&r&&!e.h)&&(e.i(e.g,i),e.h=!0,e.g=n.g.currentTime,e.o++,e.l(new To("stalldetected"))),e=!r}e&&(e=t.g.currentTime,r=function(t,e,n){return!t||!t.length||1==t.length&&1e-6>t.end(0)-t.start(0)?null:0<=(t=tu(t).findIndex((function(t,r,i){return t.start>e&&(0==r||i[r-1].end-e<=n)})))?t:null}(n=t.g.buffered,e,t.s.gapDetectionThreshold),null==r||0==r&&!t.o||((i=n.start(r))>=t.A.Na()||.001>i-e||(0!=r&&n.end(r-1),t.g.currentTime=i,e==t.i&&(t.i=i),t.C++,t.u(new To("gapjumped")))))}}}function au(t,e,n,r){var i=this;this.l=t,this.C=null,this.u=e,this.h={},this.I={},this.ca={},this.g=null,this.O=!1,this.ia=n||function(){},this.L=r||null,this.j={},this.A=new Oa,this.m={},this.D=null,this.F=new go,this.W="",this.i=su(this,this.F),this.o=!1,this.K=new Sa((function(){return function(t){var e,n,r,i,o,a,s;return I((function(u){if(1==u.g){for(n in e=[],t.j)for(r=t.j[n],i=r[0],t.j[n]=r.slice(0,1),i&&e.push(i.p.catch(Jt)),o=l(r.slice(1)),a=o.next();!a.done;a=o.next())a.value.p.reject(new Yt(2,7,7003,void 0));for(s in t.g&&e.push(t.g.destroy()),t.u&&e.push(t.u.destroy()),t.m)e.push(t.m[s].destroy());return E(u,Promise.all(e),2)}t.A&&(t.A.release(),t.A=null),t.l&&(t.l.removeAttribute("src"),t.l.load(),t.l=null),t.C=null,t.i=null,t.g=null,t.u=null,t.h={},t.m={},t.D=null,t.j={},t.L=null,T(u)}))}(i)})),this.s=!1,this.P="UNKNOWN",this.Z=this.ha=!1,this.ja=new go}function su(t,e){var n=new MediaSource;return t.A.oa(n,"sourceopen",(function(){URL.revokeObjectURL(t.W),e.resolve()})),t.W=Su(n),t.l.src=t.W,n}function uu(t,e,n){var r=ue(n.mimeType,n.codecs);if(e==ie)cu(t,r,t.s,n.external);else{var i=t.C.forceTransmux;(!Y(r)||!t.s&&pe.includes(r))&&(i=!0);var o=ce(n.mimeType,n.codecs);i&&(i=Rt(o))&&(r=i(),t.m[e]=r,r=r.convertCodecs(e,o)),o=r+t.C.sourceBufferExtraFeatures,_a(t.K);try{var a=t.i.addSourceBuffer(o)}catch(s){throw new Yt(2,3,3015,s,"The mediaSource_ status was"+t.i.readyState+"expected 'open'")}t.s&&(a.mode=_u),t.A.J(a,"error",(function(){t.j[e][0].p.reject(new Yt(2,3,3014,t.l.error?t.l.error.code:0))})),t.A.J(a,"updateend",(function(){return wu(t,e)})),t.h[e]=a,t.I[e]=r,t.ca[e]=!!n.drmInfos.length}}function cu(t,e,n,r){t.g||(t.g=new ge(t.u));var i=t.g;r=r||t.O,t=t.P,"application/cea-608"==e||"application/cea-708"==e?i.i=null:(i.i=(0,be[e])(),i.i.setSequenceMode?i.i.setSequenceMode(n):K('Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(t):K('Text parsers should have a "setManifestType" method!'),i.u=r)}function lu(t){return!t.o&&(!t.i||"ended"==t.i.readyState)}function fu(t,e){return t.o?t=null:e==ie?t=t.g.g:t=!(t=du(t,e))||1==t.length&&1e-6>t.end(0)-t.start(0)?null:1==t.length&&0>t.start(0)?0:t.length?t.start(0):null,t}function hu(t,e){return t.o?null:e==ie?t.g.h:$s(du(t,e))}function du(t,e){try{return t.h[e].buffered}catch(n){return null}}function pu(t,e,n,r,i,o,a,s){var u,c,f,h,d,p,g,m,y,v;return a=void 0!==a&&a,s=void 0!==s&&s,I((function(b){switch(b.g){case 1:if(e!=(u=oe).da){b.B(2);break}if(!t.s){b.B(3);break}return E(b,t.ja,4);case 4:c=b.h,t.g.s=c;case 3:return E(b,function(t,e,n,r){var i,o,a,s;return I((function(u){return 1==u.g?E(u,Promise.resolve(),2):t.i&&t.j?null==n||null==r?(t.i.parseInit(rt(e)),u.return()):(i=t.u?n:t.s,o={periodStart:t.s,segmentStart:n,segmentEnd:r,vttOffset:i},a=t.i.parseMedia(rt(e),o),s=a.filter((function(e){return e.startTime>=t.l&&e.startTime=t.l&&u.startTime=n?wu(t,e):t.h[e].remove(0,n)})),0)}))}function mu(e,n,r,i,o,a,s,u){var c;return I((function(f){return 1==f.g?n==oe.da?(a||(e.g.s=r),function(t,e,n){t.l=e,t.m=n}(e.g,i,o),f.return()):(c=[],E(f,function(e,n,r,i){var o,a,s,u,c,f,h,d,p;return I((function(g){return 1==g.g?(o=de(he(e.I[n]))[0],a=e.I[n].split(";")[0],u=ue(r.mimeType,r.codecs),c=e.C.forceTransmux,(!Y(u)||!e.s&&pe.includes(u))&&(c=!0),f=ce(r.mimeType,r.codecs),c&&(h=Rt(f))&&(s=h(),u=s.convertCodecs(n,f)),d=de(he(u))[0],p=u.split(";")[0],o===d&&a===p?g.return(!1):t.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType?E(g,function(e,n,r,i){return Eu(e,n,(function(){n!==ie&&(t.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType&&(e.m[n]&&e.m[n].destroy(),i&&(e.m[n]=i),e.h[n].changeType(r+e.C.sourceBufferExtraFeatures),e.I[n]=r),wu(e,n))}))}(e,n,u,s),3):(s&&s.destroy(),E(g,function(t,e){return Tu(t,(function(){return function(t,e){var n,r,i,o,a,s,u,c,f,h,d,p,g,m,y,v,b,w,T;return I((function(x){switch(x.g){case 1:for(i in t.o=!0,n=t.l.currentTime,function(t){t.m=0,t.j=2}(x),t.A.Nb(),r=[],t.m)r.push(t.m[i].destroy());for(o in t.j)for(a=t.j[o],s=a[0],t.j[o]=a.slice(0,1),s&&r.push(s.p.catch(Jt)),u=l(a.slice(1)),c=u.next();!c.done;c=u.next())c.value.p.reject(new Yt(2,7,7003,void 0));for(f in t.h){h=t.h[f];try{t.i.removeSourceBuffer(h)}catch(A){}}return E(x,Promise.all(r),4);case 4:return t.m={},t.j={},t.h={},d=t.i.duration,t.F=new go,t.i=su(t,t.F),E(x,t.F,5);case 5:for(t.i.duration=d,p=new go,g=t.i.sourceBuffers,m=e.size,y=0,t.A.J(g,"addsourcebuffer",(function(){++y===m&&p.resolve()})),v=l(e.keys()),b=v.next();!b.done;b=v.next())w=b.value,T=e.get(w),uu(t,w,T);return t.l.currentTime=n,E(x,p,2);case 2:_(x),t.o=!1,O(x)}}))}(t,e)}))}(e,i),3))):g.return(!0)}))}(e,n,s,u),2)):(f.h||c.push(Eu(e,n,(function(){return vu(e,n)}))),a||c.push(Eu(e,n,(function(){return bu(e,n,r)}))),c.push(Eu(e,n,(function(){e.h[n].appendWindowStart=0,e.h[n].appendWindowEnd=o,e.h[n].appendWindowStart=i,wu(e,n)}))),E(f,Promise.all(c),0))}))}function yu(t,e,n){return I((function(r){return e==oe.da?r.return():(Eu(t,e,(function(){return vu(t,e)})),E(r,Eu(t,e,(function(){return bu(t,e,n)})),0))}))}function vu(t,e){var n=t.h[e].appendWindowStart,r=t.h[e].appendWindowEnd;t.h[e].abort(),t.h[e].appendWindowStart=n,t.h[e].appendWindowEnd=r,wu(t,e)}function bu(t,e,n){0>n&&(n+=.001),t.h[e].timestampOffset=n,wu(t,e)}function wu(t,e){if(!t.o){var n=t.j[e][0];n&&(n.p.resolve(),xu(t,e))}}function Eu(t,e,n){return _a(t.K),n={start:n,p:new go},t.j[e].push(n),1==t.j[e].length&&Au(t,e),n.p}function Tu(t,e){var n,r,i,o,a;return I((function(s){switch(s.g){case 1:for(i in _a(t.K),n=[],r={},t.h)r.Sb=new go,o={start:function(t){return function(){return t.Sb.resolve()}}(r),p:r.Sb},t.j[i].push(o),n.push(r.Sb),1==t.j[i].length&&o.start(),r={Sb:r.Sb};return x(s,2),E(s,Promise.all(n),4);case 4:A(s,3);break;case 2:throw S(s);case 3:return x(s,5,6),E(s,e(),6);case 6:for(a in _(s),t.h)xu(t,a);O(s);break;case 5:throw new Yt(2,3,3015,S(s),t.l.error||"No error in the media element")}}))}function xu(t,e){t.j[e].shift(),Au(t,e)}function Au(t,e){var n=t.j[e][0];if(n)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new Yt(2,3,3017,e)):n.p.reject(new Yt(2,3,3015,r,t.l.error||"No error in the media element")),xu(t,e)}}eu.prototype.release=function(){this.l=this.j=null,this.i=function(){}},iu.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.m&&(this.m.stop(),this.m=null),this.h&&(this.h.release(),this.h=null),this.g=this.A=this.u=null},iu.prototype.Kd=function(){this.o=!0,ou(this)},(r=au.prototype).destroy=function(){return this.K.destroy()},r.init=function(t,e,n,r){e=void 0!==e&&e,n=void 0===n?"UNKNOWN":n,r=void 0!==r&&r;var i,o,a,s,u=this;return I((function(c){if(1==c.g)return E(c,u.F,2);for(u.s=e,u.P=n,u.ha=r,u.Z=!u.s&&"HLS"==u.P&&!u.ha,i=l(t.keys()),o=i.next();!o.done;o=i.next())a=o.value,s=t.get(a),uu(u,a,s),u.j[a]=[];T(c)}))},r.configure=function(t){this.C=t},r.Ma=function(){var t={total:this.o?[]:tu(this.l.buffered),audio:this.o?[]:tu(du(this,"audio")),video:this.o?[]:tu(du(this,"video")),text:[]};if(this.g){var e=this.g.g,n=this.g.h;null!=e&&null!=n&&t.text.push({start:e,end:n})}return t},r.remove=function(t,e,n){var r=this;return I((function(i){return t==oe.da?E(i,r.g.remove(e,n),0):E(i,Eu(r,t,(function(){n<=e?wu(r,t):r.h[t].remove(e,n)})),0)}))},r.flush=function(t){var e=this;return I((function(n){return t==oe.da?n.return():E(n,Eu(e,t,(function(){e.l.currentTime-=.001,wu(e,t)})),0)}))},r.endOfStream=function(t){var e=this;return I((function(n){return E(n,Tu(e,(function(){lu(e)||"closed"===e.i.readyState||(t?e.i.endOfStream(t):e.i.endOfStream())})),0)}))},r.Va=function(t){var e=this;return I((function(n){return E(n,Tu(e,(function(){if(t=e?r():(e=ku.value().get(e),n.oa(t,e,r))}Ou.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},Ou.prototype.set=function(t){this.i=t,Ru(this)},Ou.prototype.Ec=function(){return this.g.Ec()};var ku=new _r((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function Nu(t,e,n,r){var i=this;this.g=t,this.m=e,this.s=n,this.l=null,this.j=function(){return null==i.l&&(i.l=r()),i.l},this.o=!1,this.h=new Oa,this.i=new ju(t),Cu(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){Lu(i,i.j())}))}function Iu(t){return t.o?t.g.currentTime:t.j()}function Pu(t,e){0Math.abs(t.g.currentTime-e)?Mu(t):(t.h.oa(t.g,"seeking",(function(){Mu(t)})),Du(t.i,t.g.currentTime&&0!=t.g.currentTime?t.g.currentTime:e))}function Mu(t){t.o=!0,t.h.J(t.g,"seeking",(function(){return t.m()})),t.s(t.g.currentTime)}function ju(t){var e=this;this.h=t,this.m=10,this.l=this.j=this.i=0,this.g=new Ie((function(){0>=e.i||e.h.currentTime!=e.j?e.g.stop():(e.h.currentTime=e.l,e.i--)}))}function Du(t,e){t.j=t.h.currentTime,t.l=e,t.i=t.m,t.h.currentTime=e,t.g.sa(.1)}function Bu(t){this.g=t,this.j=!1,this.h=null,this.i=new Oa}function Uu(t,e,n,r,i,o){var a=this;this.i=t,this.g=e.presentationTimeline,this.A=e.minBufferTime||0,this.l=n,this.u=i,this.s=null,this.o=function(t,e,n){if(!e.stallEnabled)return null;var r=e.stallSkip;return e=new eu(new nu(t),e.stallThreshold,n),function(t,e){t.i=e}(e,(function(){r?t.currentTime+=r:(t.pause(),t.play())})),e}(t,n,o),this.j=new iu(t,e.presentationTimeline,n,this.o,o),this.h=new Nu(t,(function(){var t=a.j;t.j=!0,t.o=!1;var e=Iu(a.h);return t=Hu(a,e),.001a.g.getDuration()?a.g.Fb():a.g.Na():0>t&&(t=a.g.Na()+t),Fu(a,Vu(a,t))})),this.m=new Ie((function(){if(0!=a.i.readyState&&!a.i.paused){var t=Iu(a.h),e=a.g.Fb(),n=a.g.Na();3>n-e&&(e=n-3),t=n?n-t.l.durationBackoff:e}function Hu(t,e){var n=Math.max(t.A,t.l.rebufferingGoal),r=t.l.safeSeekOffset,i=t.g.Fb(),o=t.g.Na(),a=t.g.getDuration();3>o-i&&(i=o-3);var s=t.g.hc(n),u=t.g.hc(r);return n=t.g.hc(n+r),e>=a?Fu(t,e):e>o?o:e=s||Js(t.i.buffered,e)?e:n}function Vu(t,e){var n=t.g.Fb();return e(t=t.g.Na())?t:e}function Gu(t){var e=this;this.h=t,this.g=new Set,this.i=new Ie((function(){qu(e,!1)})).sa(.25)}function qu(t,e){for(var n=l(t.g),r=n.next();!r.done;r=n.next())r.value.j(t.h.currentTime,e)}function zu(t){xo.call(this),this.g=new Map,this.h=t}function Ku(t){xo.call(this);var e=this;this.g=new Set,this.i=t,this.h=new Ie((function(){for(var t=e.i(),n=l(e.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime=o[0].start&&ir.endTime?$u:Zu;this.g.set(r,o);for(var a=l(this.m),s=a.next();!s.done;s=a.next())(s=s.value).vb==i&&s.ub==o&&s.ob(r,e)}}};var Yu=1,Zu=2,$u=3;function Ju(t,e,n){this.j=t,this.h=e,this.i=0,this.l=n,this.g=new Map}function Qu(t){if(0!==t.g.size){for(var e=l(t.g.keys()),n=e.next();!n.done;n=e.next())(n=n.value)&&tc(t,n);t.i=0}}function tc(t,e){var n=t.g.get(e);t.g.delete(e),n&&n.abort()}function ec(t){this.i=t,this.g=this.h=null}function nc(t,e,n){t.g=t.i(e,n,(function(e){return I((function(n){return t.h?E(n,t.h(e),0):n.B(0)}))}))}function rc(t,e){var n=this;this.g=e,this.m=t,this.i=null,this.u=1,this.o=this.j=null,this.D=0,this.C=!1,this.h=new Map,this.A=!1,this.F=null,this.s=!1,this.l=new Sa((function(){return function(t){var e,n,r,i;return I((function(o){if(1==o.g){for(e=[],n=l(t.h.values()),r=n.next();!r.done;r=n.next())vc(i=r.value),e.push(bc(i));return E(o,Promise.all(e),2)}t.h.clear(),t.g=null,t.m=null,t.i=null,T(o)}))}(n)}))}function ic(t,e){var n=t.h.get("video");if(n){var r=n.stream;r&&(e?(e=r.trickModeVideo)&&!n.rb&&(sc(t,e,!1,0,!1),n.rb=r):(r=n.rb)&&(n.rb=null,sc(t,r,!0,0,!1)))}}function oc(t,e,n,r,i,o){n=void 0!==n&&n,r=void 0===r?0:r,i=void 0!==i&&i,o=void 0!==o&&o,t.j=e,t.A&&(e.video&&sc(t,e.video,n,r,i,o),e.audio&&sc(t,e.audio,n,r,i,o))}function ac(t,e){I((function(n){if(1==n.g)return t.o=e,t.A?e.segmentIndex?n.B(2):E(n,e.createSegmentIndex(),2):n.return();sc(t,e,!0,0,!1),T(n)}))}function sc(t,e,n,r,i,o){var a=t.h.get(e.type);a||e.type!=ie?a&&(a.rb&&(e.trickModeVideo?(a.rb=e,e=e.trickModeVideo):a.rb=null),a.stream!=e||i)&&(a.ra&&function(t,e){e&&e!==t.h&&(Qu(t),t.h=e)}(a.ra,e),e.type==ie&&(i=ue(e.mimeType,e.codecs),cu(t.g.N,i,t.m.sequenceMode,e.external)),a.stream.closeSegmentIndex&&a.stream.closeSegmentIndex(),a.stream=e,a.X=null,a.ee=!!o,n&&(a.$b?a.Zc=!0:a.pa?(a.eb=!0,a.Ac=r,a.Zc=!0):(vc(a),mc(t,a,!0,r).catch((function(e){t.g&&t.g.onError(e)})))),function(t,e){var n,r;return I((function(i){if(1==i.g)return e.qa?(n=e.stream,r=e.qa,n.segmentIndex?i.B(2):E(i,n.createSegmentIndex(),2)):i.return();if(e.qa!=r||e.stream!=n)return i.return();var o=t.g.Hc(),a=hu(t.g.N,e.type),s=e.stream.segmentIndex.find(e.na?e.na.endTime:o),u=null==s?null:e.stream.segmentIndex.get(s);s=u&&u.i?u.i-u.j:null,u&&!s&&(s=(u.endTime-u.getStartTime())*(e.stream.bandwidth||0)/8),s?((u=u.g)&&(s+=(u.i?u.i-u.j:null)||0),o=8*s/(u=t.g.getBandwidthEstimate())<(a||0)-o-Math.max(t.m.minBufferTime||0,t.i.rebufferingGoal)||e.qa.h.g>s):o=!1,o&&e.qa.abort(),T(i)}))}(t,a).catch((function(e){t.g&&t.g.onError(e)}))):function(t,e){var n,r,i,o,a;I((function(s){switch(s.g){case 1:return n=oe,t.D++,r=t.D,x(s,2),E(s,gu(t.g.N,n.da),4);case 4:A(s,3);break;case 2:i=S(s),t.g&&t.g.onError(i);case 3:o=ue(e.mimeType,e.codecs),cu(t.g.N,o,t.m.sequenceMode,e.external),(t.g.N.u.isTextVisible()||t.i.alwaysStreamText)&&t.D==r&&(a=cc(t,e),t.h.set(n.da,a),yc(t,a,0)),T(s)}}))}(t,e)}function uc(t,e){e.$b||e.eb||(e.pa?(e.eb=!0,e.Ac=0):null==fu(t.g.N,e.type)?null==e.Ha&&yc(t,e,0):(vc(e),mc(t,e,!1,0).catch((function(e){t.g&&t.g.onError(e)}))))}function cc(t,e){return{stream:e,type:e.type,X:null,ra:lc(t,e),na:null,Ib:null,yd:null,wd:null,vd:null,rb:null,endOfStream:!1,pa:!1,Ha:null,eb:!1,Ac:0,Zc:!1,$b:!1,rc:!0,Fd:!1,Qd:!1,kc:!1,qa:null}}function lc(t,e){return"video"!==e.type&&"audio"!==e.type?null:0s&&u)return n.endOfStream=!0,"video"==n.type&&(e=e.h.get(ie))&&dc(e)&&(e.endOfStream=!0),null;if(n.endOfStream=!1,o>=a)return e.i.updateIntervalSeconds/2;if(o=function(t,e,n,r){if(e.X)return e.X.current();if(e.na||r)return n=e.na?e.na.endTime:r,e.Fd=!0,e.X=e.stream.segmentIndex.kb(n),e.X&&e.X.next().value;t=t.i.inaccurateManifestTolerance,r=Math.max(n-t,0);var i=null;return t&&(e.X=e.stream.segmentIndex.kb(r),i=e.X&&e.X.next().value),i||(e.X=e.stream.segmentIndex.kb(n),i=e.X&&e.X.next().value),i}(e,n,r,u),!o)return e.i.updateIntervalSeconds;for(a=1/0,s=l(s=Array.from(e.h.values())),u=s.next();!u.done;u=s.next())dc(u=u.value)||u.X&&!u.X.current()||(a=Math.min(a,u.na?u.na.endTime:r));return i>=a+e.m.presentationTimeline.g?e.i.updateIntervalSeconds:(n.ra&&n.X&&function(t,e){if(t.h.segmentIndex){var n=t.h.segmentIndex.kb(Math.max(e.startTime,t.i));if(n)for(;t.g.size>=8;return u.return(t.crypto.subtle.decrypt({name:"AES-CBC",iv:o},i.cryptoKey,e))}))}(l,i,s),9);case 9:l=b.h;case 8:return _a(e.l),n.eb?(n.pa=!1,yc(e,n,0),b.return()):E(b,hc(e,n,r,a,i,l),6);case 11:if(g=b.h,d){b.B(6);break}return h=!0,_a(e.l),e.s?b.return():n.eb?(n.pa=!1,yc(e,n,0),b.return()):E(b,hc(e,n,r,a,i,g),6);case 6:if(_a(e.l),e.s)return b.return();n.na=i,s.next(),n.pa=!1,n.Qd=!1,m=e.g.N.Ma(),y=m[n.type],JSON.stringify(y),n.eb||e.g.Kd(i.startTime,i.endTime,n.type),yc(e,n,0),A(b,0);break;case 2:if(v=S(b),_a(e.l,v),e.s)return b.return();if(n.pa=!1,7001==v.code)n.pa=!1,vc(n),yc(e,n,0),b.B(0);else if(n.type==o.da&&e.i.ignoreTextStreamFailures)e.h.delete(o.da),b.B(0);else{if(3017!=v.code)return n.kc=!0,v.severity=2,E(b,wc(e,n,v),0);(function(t,e,n){if(!Array.from(t.h.values()).some((function(t){return t!=e&&t.Qd}))){var r=Math.round(100*t.u);if(20=(o=n-i-r)?a.return():E(a,t.g.N.remove(e.type,i,i+o),2);_a(t.l),T(a)}))}(t,e,n),2);case 2:return _a(t.l),l=e.rc,e.rc=!1,f=e.ee,e.ee=!1,E(h,t.g.fe(e.type,o),3);case 3:return E(h,pu(t.g.N,e.type,o,i,r,a,l,f),4);case 4:_a(t.l),T(h)}}))}function dc(t){return t&&t.type==ie&&("application/cea-608"==t.stream.mimeType||"application/cea-708"==t.stream.mimeType)}function pc(t,e,n,r,i){var o,a,s;return I((function(u){if(1==u.g){if(n instanceof Vo&&(o=n.g))return u.return(o);if(a=null,e.ra&&n instanceof Go){var c=e.ra;if(c.g.has(n)){var l=c.g.get(n);r&&(l.h=r),c.g.delete(n),a=l.g}else a=null}return a||(a=gc(t,n,e.stream,r,i)),e.qa=a,E(u,a.promise,2)}return s=u.h,e.qa=null,u.return(s.data)}))}function gc(t,e,n,r,i){i=i?0:1;var o=e instanceof Go?e:void 0;return e=Aa(e.Oa(),e.j,e.i,t.i.retryParameters,r),t.g.mc.request(Lo,e,{type:i,stream:n,segment:o})}function mc(t,e,n,r){var i,o;return I((function(a){return 1==a.g?(e.eb=!1,e.Zc=!1,e.Ac=0,e.$b=!0,e.na=null,e.Ib=null,e.X=null,e.ra&&Qu(e.ra),r?(i=t.g.Hc(),o=t.g.N.getDuration(),E(a,t.g.N.remove(e.type,i+r,o),3)):E(a,gu(t.g.N,e.type),4)):3!=a.g?(_a(t.l),n?E(a,t.g.N.flush(e.type),3):a.B(3)):(_a(t.l),e.$b=!1,e.endOfStream=!1,e.pa||e.Ha||yc(t,e,0),void T(a))}))}function yc(t,e,n){var r=e.type;(r!=ie||t.h.has(r))&&(e.Ha=new Ne((function(){var n;return I((function(r){return 1==r.g?(x(r,2),E(r,fc(t,e),4)):2!=r.g?A(r,0):(n=S(r),t.g&&t.g.onError(n),void T(r))}))})).V(n))}function vc(t){null!=t.Ha&&(t.Ha.stop(),t.Ha=null)}function bc(t){return I((function(e){return t.qa?E(e,t.qa.abort(),0):e.B(0)}))}function wc(t,e,n){var r;return I((function(i){if(1==i.g)return E(i,po(t.F),2);_a(t.l),r=0===t.i.maxDisabledTime&&1011==n.code?1:t.i.maxDisabledTime,1===n.category&&0n.byteLength){n=[];break t}var o=rt(n,t,i);e.push({type:r,value:o}),t+=i}n=e}return n}(t=Ci(t.textContent)).filter((function(t){return t.type===xc}))[0])&&(t=io(t=Cr(t.value,!0),"WRMHEADER"))?t:null}ec.prototype.abort=function(){this.g&&this.g.abort()},(r=rc.prototype).destroy=function(){return this.l.destroy()},r.configure=function(t){this.i=t,this.F=new ho({maxAttempts:Math.max(t.retryParameters.maxAttempts,2),baseDelay:t.retryParameters.baseDelay,backoffFactor:t.retryParameters.backoffFactor,fuzzFactor:t.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);for(var e=l(this.h.keys()),n=e.next();!n.done;n=e.next())if((n=this.h.get(n.value)).ra){var r=n.ra,i=t.segmentPrefetchLimit;r.j=i;for(var o=Array.from(r.g.keys());o.length>i;){var a=o.pop();a&&tc(r,a)}0t||i.endTime=i.g&&tt?this.g.N.Va(t):this.g.N.Va(Math.pow(2,32))};var xc=1,Ac=(new Map).set("com.microsoft.playready",Ec).set("com.microsoft.playready.recommendation",Ec).set("com.microsoft.playready.software",Ec).set("com.microsoft.playready.hardware",Ec);function Sc(t){if(!Pc){Pc=!0;var e=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);zc=Ic("ftyp",e,r,e,n),e=Ic("dref",Kc),Wc=Ic("dinf",e)}this.g=t}function _c(t){var e=Ic,n=new Uint8Array([]);switch(t.type){case"video":if(t.codecs.includes("avc1")){n=t.stream.width||0;var r=t.stream.height||0;if(0>8,o[h++]=255&a[u].length,o.set(a[u],h),h+=a[u].length;for(o[h++]=s.length,a=0;a>8,o[h++]=255&s[a].length,o.set(s[a],h),h+=s[a].length;i=i("avcC",o)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(f(kc(n,2)),f(kc(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="avc1",s=new Uint8Array([]),t.encrypted&&(s=Rc(t),r="encv"),n=Ic(r,n,i,s)}else t.codecs.includes("hvc1")&&(r=t.stream.width||0,i=t.stream.height||0,n=new Uint8Array([]),0>>1,a<<7|s<<3,6,1,2])))),r="mp4a",i=new Uint8Array([]),t.encrypted&&(i=Rc(t),r="enca"),t=Ic(r,Oc(t),n,i)),n=t}return e("stbl",t=Ic("stsd",qc,n),Ic("stts",Bc),Ic("stsc",Uc),Ic("stsz",Hc),Ic("stco",Fc))}function Oc(t){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.stream.channelsCount||2,0,16,0,0,0,0].concat(f(kc(t.stream.audioSamplingRate||44100,2)),[0,0]))}function Rc(t){for(var e=Ic,n=t.codecs.substring(0,t.codecs.indexOf(".")),r=0,i=0;i>8*e&255);return n}function Nc(t){for(var e=new Uint8Array(t.length/2),n=0;n>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=255&r,i.set(n,4),n=0,r=8;n(O=O||0))if(R){if(null==(R=Xi(R,"t",to)))break;if(C>=R)break;O=Math.ceil((R-C)/k)-1}else{if(1/0==w)break;if(C/v>=w)break;O=Math.ceil((w*v-C)/k)-1}for(R=0;R<=O;++R)S=C+k,A.push({start:C/v,end:S/v,be:C}),C=S}for(v=A,w=(b=l(b)).next();!w.done;w=b.next())(w=Zc(t,y,w.value,v,g,c))&&("audio"!=w.type||t.g.disableAudio?"video"!=w.type||t.g.disableVideo?w.type!=ie||t.g.disableText||p.push(w):d.push(w):m.push(w))}for(h=[],g=(m=l(0>1,n[1]=r<<7|e<<3|t>>1,n[2]=t<<7|8,n[3]=0,e=new Uint16Array(2),e[0]=(n[0]<<8)+n[1],e[1]=(n[2]<<8)+n[3],e[0].toString(16)+e[1].toString(16)):(n=new Uint8Array(2),n[0]=16|r>>1,n[1]=r<<7|e<<3,e=new Uint16Array(1),e[0]=(n[0]<<8)+n[1],e[0].toString(16))}(n,a,i,y),y.mssPrivateData.codecPrivateData=n,a){case"audio":if(!n)return K("Quality unsupported without CodecPrivateData",a),null;y.type="audio",y.mimeType="mss/audio/mp4",y.codecs=function(t,e){var n=0;return"AACH"===t&&(n=5),e?0===n&&(n=(248&parseInt(e.substr(0,2),16))>>3):(n=2,"AACH"===t&&(n=5)),"mp4a.40."+n}(i,n);break;case"video":if(!n)return K("Quality unsupported without CodecPrivateData",a),null;y.type="video",y.mimeType="mss/video/mp4",y.codecs=function(t){var e=/00000001[0-9]7/.exec(t);return e.length&&t?"avc1."+t.substr(t.indexOf(e[0])+10,6):""}(n);break;case"text":y.type=ie,y.mimeType="application/mp4",("TTML"===i||"DFXP"===i)&&(y.codecs="stpp")}return y.createSegmentIndex=function(){if(y.segmentIndex)return Promise.resolve();if(t.m.has(y.id))var n=t.m.get(y.id);else n=[],"video"==y.type&&(n=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=new Sc([n={id:y.id,type:y.type,codecs:y.codecs,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,xa:n,Y:new Uint8Array([]),ga:new Uint8Array([]),data:null,stream:y}]).initSegment(),t.m.set(y.id,n);return n=function(t,e,n,r,i){var o=r.getAttribute("Url").replace("{bitrate}",String(n.bandwidth));r=[];for(var a={},s=(i=l(i)).next();!s.done;a={Ub:a.Ub},s=i.next())a.Ub=s.value,r.push(new Go(a.Ub.start,a.Ub.end,function(e){return function(){return te(t.l,[o.replace("{start time}",String(e.Ub.be))])}}(a),0,null,e,0,0,n.mssPrivateData.duration));return r}(t,new Vo((function(){return[]}),0,null,null,void 0,n),y,e,r),y.segmentIndex=new Wo(n),Promise.resolve()},y.closeSegmentIndex=function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)},y}(r=Xc.prototype).configure=function(t){this.g=t},r.start=function(t,e){var n=this;return I((function(r){if(1==r.g)return n.l=[t],n.h=e,E(r,Yc(n),2);if(!n.h)throw new Yt(2,7,7001);return r.return(n.j)}))},r.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.u.destroy()},r.update=function(){var t,e=this;return I((function(n){return 1==n.g?(x(n,2),E(n,Yc(e),4)):2!=n.g?A(n,0):(t=S(n),e.h&&t?(e.h.onError(t),void T(n)):n.return())}))},r.onExpirationUpdated=function(){},F("shaka.mss.MssParser",Xc);var $c="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Jc={CAPT:"main",SUBT:"alternate",DESC:"main"};function Qc(t,e,n,r,i,o){if(200<=n&&299>=n&&202!=n)return{uri:i||r,originalUri:r,data:e,status:n,headers:t,fromCache:!!t["x-shaka-from-cache"]};i=null;try{i=kr(e)}catch(a){}throw new Yt(401==n||403==n?2:1,1,1001,r,n,i,t,o)}function tl(){}function el(t,e,n,r,i){var o=new sl;ka(e.headers).forEach((function(t,e){o.append(e,t)}));var a=new ol,s={he:!1,Le:!1};if(t=function(t,e,n,r,i,o,a){var s,u,c,l,f,h,d,p,g,m,y,v;return I((function(b){switch(b.g){case 1:return s=il,u=al,h=f=0,d=Date.now(),x(b,2),E(b,s(t,n),4);case 4:if(c=b.h,o(nl(c.headers)),"HEAD"==n.method){b.B(5);break}return p=c.clone().body.getReader(),m=(g=c.headers.get("Content-Length"))?parseInt(g,10):0,new u({start:function(t){function e(){var n,r;return I((function(o){switch(o.g){case 1:return x(o,2),E(o,p.read(),4);case 4:n=o.h,A(o,3);break;case 2:return S(o),o.return();case 3:if(n.done){o.B(5);break}if(f+=n.value.byteLength,!a){o.B(5);break}return E(o,a(n.value),5);case 5:(100<(r=Date.now())-d||n.done)&&(i(r-d,f-h,m-f),h=f,d=r),n.done?t.close():(t.enqueue(n.value),e()),T(o)}}))}e()}}),E(b,c.arrayBuffer(),6);case 6:l=b.h;case 5:A(b,3);break;case 2:if(y=S(b),r.he)throw new Yt(1,1,7001,t,e);if(r.Le)throw new Yt(1,1,1003,t,e);throw new Yt(1,1,1002,t,y,e);case 3:return v=nl(c.headers),b.return(Qc(v,l,c.status,t,c.url,e))}}))}(t,n,{body:e.body||void 0,headers:o,method:e.method,signal:a.signal,credentials:e.allowCrossSiteCredentials?"include":void 0},s,r,i,e.streamDataCallback),t=new mo(t,(function(){return s.he=!0,a.abort(),Promise.resolve()})),e=e.retryParameters.timeout){var u=new Ie((function(){s.Le=!0,a.abort()}));u.V(e/1e3),t.finally((function(){u.stop()}))}return t}function nl(t){var e={};return t.forEach((function(t,n){e[n.trim()]=t})),e}function rl(){if(!t.ReadableStream)return!1;try{new ReadableStream({})}catch(bp){return!1}return!!t.Response&&(!!new Response("").body&&!(!t.fetch||!t.AbortController))}Ta.ism=function(){return new Xc},Ea["application/vnd.ms-sstr+xml"]=function(){return new Xc},F("shaka.net.HttpFetchPlugin",tl),tl.isSupported=rl,tl.parse=el;var il=t.fetch,ol=t.AbortController,al=t.ReadableStream,sl=t.Headers;function ul(){}function cl(t,e,n,r,i){var o=new fl,a=Date.now(),s=0;return new mo(new Promise((function(u,c){o.open(e.method,t,!0),o.responseType="arraybuffer",o.timeout=e.retryParameters.timeout,o.withCredentials=e.allowCrossSiteCredentials,o.onabort=function(){c(new Yt(1,1,7001,t,n))};var l=!1;for(var f in o.onreadystatechange=function(){if(2==o.readyState&&!l){var t=ll(o);i(t),l=!0}},o.onload=function(){var e=ll(o),r=o.response;try{var i=Qc(e,r,o.status,t,o.responseURL,n);u(i)}catch(a){c(a)}},o.onerror=function(e){c(new Yt(1,1,1002,t,e,n))},o.ontimeout=function(){c(new Yt(1,1,1003,t,n))},o.onprogress=function(t){var e=Date.now();(100"+t+""}),t.S)}function ml(t){switch(t.toLowerCase()){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function yl(t){for(var e=[],n=(t=l(t)).next();!n.done;n=t.next()){var r=(n=n.value).clone();r.g=[],r.S=gl(n),e.push(r)}return e}function vl(t){this.g=null;for(var e=l(Array.from(t.textTracks)),n=e.next();!n.done;n=e.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=t.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function bl(t){if(t.startTime>=t.endTime)return null;var e=new VTTCue(t.startTime,t.endTime,t.S);e.lineAlign=t.i,e.positionAlign=t.D,t.size&&(e.size=t.size);try{e.align=t.textAlign}catch(n){}return"center"==t.textAlign&&"center"!=e.align&&(e.align="middle"),"vertical-lr"==t.writingMode?e.vertical="lr":"vertical-rl"==t.writingMode&&(e.vertical="rl"),1==t.u&&(e.snapToLines=!1),null!=t.h&&(e.line=t.h),null!=t.position&&(e.position=t.position),e}function wl(t,e){var n=t.mode;t.mode="showing"==n?"showing":"hidden";for(var r=l(Array.from(t.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&e(i)&&t.removeCue(i);t.mode=n}function El(){}function Tl(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function xl(e,n){var r=this;this.j=!1,this.i=[],this.A=e,this.m=n,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.m.appendChild(this.g),this.u=new Ie((function(){_l(r)})).sa(.25),this.h=new Map,this.s=new Oa,this.s.J(document,"fullscreenchange",(function(){_l(r,!0)})),this.l=null,"ResizeObserver"in t&&(this.l=new ResizeObserver((function(){_l(r,!0)})),this.l.observe(this.g)),this.o=new Map}function Al(t,e){for(;null!=e;){if(e==t.g)return!0;e=e.parentElement}return!1}function Sl(t,e,n,r,i){for(var o=!1,a=[],s=[],u=(e=l(e)).next();!u.done;u=e.next()){u=u.value,i.push(u);var c=t.h.get(u),f=u.startTime<=r&&u.endTime>r,h=c?c.Pe:null;c&&(a.push(c.jd),c.qc&&a.push(c.qc),f||(o=!0,t.h.delete(u),c=null)),f&&(s.push(u),c?Al(t,h)||(o=!0):(Ol(t,u,i),h=(c=t.h.get(u)).Pe,o=!0)),0t})),!0)},r.append=function(t){var e=yl(t),n=[];t=this.g.cues?Array.from(this.g.cues):[];for(var r={},i=(e=l(e)).next();!i.done;r={wb:r.wb},i=e.next())r.wb=i.value,t.some(function(t){return function(e){return e.startTime==t.wb.startTime&&e.endTime==t.wb.endTime&&e.text==t.wb.S}}(r))||(i=bl(r.wb))&&n.push(i);for(r=(t=l(t=n.slice().sort((function(t,e){return t.startTime!=e.startTime?t.startTime-e.startTime:t.endTime!=e.endTime?t.endTime-e.startTime:"line"in VTTCue.prototype?n.indexOf(e)-n.indexOf(t):n.indexOf(t)-n.indexOf(e)})))).next();!r.done;r=t.next())this.g.addCue(r.value)},r.destroy=function(){return this.g&&(wl(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},r.isTextVisible=function(){return"showing"==this.g.mode},r.setTextVisibility=function(t){this.g.mode=t?"showing":"hidden"},F("shaka.text.SimpleTextDisplayer",vl),vl.prototype.setTextVisibility=vl.prototype.setTextVisibility,vl.prototype.isTextVisible=vl.prototype.isTextVisible,vl.prototype.destroy=vl.prototype.destroy,vl.prototype.append=vl.prototype.append,vl.prototype.remove=vl.prototype.remove,F("shaka.util.Dom",El),El.removeAllChildren=Tl,(r=xl.prototype).append=function(t){for(var e=[].concat(f(this.i)),n={},r=(t=l(t)).next();!r.done;n={vc:n.vc},r=t.next())n.vc=r.value,e.some(function(t){return function(e){return pt(e,t.vc)}}(n))||this.i.push(n.vc);_l(this)},r.destroy=function(){this.m.removeChild(this.g),this.g=null,this.j=!1,this.i=[],this.u&&this.u.stop(),this.h.clear(),this.s&&(this.s.release(),this.s=null),this.l&&(this.l.disconnect(),this.l=null)},r.remove=function(t,e){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter((function(n){return n.startTime=e})),_l(this,n>this.i.length),!0},r.isTextVisible=function(){return this.j},r.setTextVisibility=function(t){this.j=t},F("shaka.text.UITextDisplayer",xl),xl.prototype.setTextVisibility=xl.prototype.setTextVisibility,xl.prototype.isTextVisible=xl.prototype.isTextVisible,xl.prototype.remove=xl.prototype.remove,xl.prototype.destroy=xl.prototype.destroy,xl.prototype.append=xl.prototype.append,F("shaka.text.WebVttGenerator",(function(){})),Cl.prototype.configure=function(t){this.g=t};var Ll="m",Ml="a",jl="v",Dl="av",Bl="i",Ul="c",Fl="tt";function Hl(){}function Vl(t,e,n,r,i){var o,a=i in r,s=!0;for(o in e){var u=i+"."+o,c=a?r[i]:n[o];a||o in n?void 0===e[o]?void 0===c||a?delete t[o]:t[o]=Ao(c):c.constructor==Object&&e[o]&&e[o].constructor==Object?(t[o]||(t[o]=Ao(c)),u=Vl(t[o],e[o],c,r,u),s=s&&u):typeof e[o]!=typeof c||null==e[o]||"function"!=typeof e[o]&&e[o].constructor!=c.constructor?(z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[o]&&n[o].length!=e[o].length&&K("Unexpected number of arguments for "+u),t[o]=e[o]):(z("Invalid config, unrecognized key "+u),s=!1)}return s}function Gl(t,e){for(var n={},r=n,i=0,o=0;!(0>(i=t.indexOf(".",i)));)0!=i&&"\\"==t[i-1]||(r[o=t.substring(o,i).replace(/\\\./g,".")]={},r=r[o],o=i+1),i+=1;return r[t.substring(o).replace(/\\\./g,".")]=e,n}function ql(t,e){return t&&e}function zl(){}function Kl(t){return new Mt(t=kr(t)).Da}function Wl(t,e,n){function r(t){it(o).setUint32(a,t.byteLength,!0),a+=4,o.set(rt(t),a),a+=t.byteLength}if(!n||!n.byteLength)throw new Yt(2,6,6015);var i;i="string"==typeof e?Ir(e,!0):e,t=Ir(t=kr(t),!0);var o=new Uint8Array(12+t.byteLength+i.byteLength+n.byteLength),a=0;return r(t),r(i),r(n),o}function Xl(t,e,n){return"skd"!==e?t:(e=n.serverCertificate,Wl(t,n=kr(t).split("skd://").pop(),e))}function Yl(t,e){2===t&&(e.headers["Content-Type"]="application/octet-stream")}function Zl(){}function $l(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(e,n,r){return t.shakaMediaKeysPolyfill&&"skd"==n&&(n=r.serverCertificate,e=Wl(e,r=Kl(e),n)),e},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:je(),minHdcpVersion:""},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(t){return ql([t],t)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:!(Ve("Tizen 3")||Ve("Tizen 2")||Be()||Fe()),ignoreManifestTimestampsInSegmentsMode:!1},mss:{manifestPreprocessor:function(t){return ql([t],t)},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(t){return ql([t])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1};(Ve("Web0S")||De()||Ve("CrKey"))&&(i.stallSkip=0);var o={trackSelectionCallback:function(t){return I((function(e){return e.return(t)}))},downloadSizeCallback:function(t){var e;return I((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?E(n,navigator.storage.estimate(),3):n.return(!0):(e=n.h,n.return(e.usage+t<.95*e.quota))}))},progressCallback:function(t,e){return ql([t,e])},usePersistentLicense:!0,numberOfParallelDownloads:5},a={drm:n,manifest:r,streaming:i,mediaSource:{sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:o,abrFactory:function(){return new On},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};return o.trackSelectionCallback=function(t){return I((function(e){return e.return(function(t,e){var n=t.filter((function(t){return"variant"==t.type})),r=[],i=Re(e,n.map((function(t){return t.language})));i&&(r=n.filter((function(t){return Ae(t.language)==i}))),0==r.length&&(r=n.filter((function(t){return t.primary}))),0==r.length&&(n.map((function(t){return t.language})),r=n);var o=r.filter((function(t){return t.height&&480>=t.height}));for(o.length&&(o.sort((function(t,e){return e.height-t.height})),r=o.filter((function(t){return t.height==o[0].height}))),e=[],r.length&&(n=Math.floor(r.length/2),r.sort((function(t,e){return t.bandwidth-e.bandwidth})),e.push(r[n])),t=l(t),r=t.next();!r.done;r=t.next())(r=r.value).type!=ie&&"image"!=r.type||e.push(r);return e}(t,a.preferredAudioLanguage))}))},a}function Jl(t,e,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Vl(t,e,n||$l(),r,"")}function Ql(){this.g=null,this.h=[]}function tf(t,e){if(null==t.g)t.g={timestamp:Date.now()/1e3,state:e,duration:0};else{var n=Date.now()/1e3;t.g.duration=n-t.g.timestamp,t.g.state!=e&&(t.h.push(t.g),t.g={timestamp:n,state:e,duration:0})}}function ef(t,e){var n=0;t.g&&t.g.state==e&&(n+=t.g.duration);for(var r=(t=l(t.h)).next();!r.done;r=t.next())n+=(r=r.value).state==e?r.duration:0;return n}function nf(){this.i=this.h=null,this.g=[]}function rf(t,e,n){t.i!=e&&(t.i=e,t.g.push({timestamp:Date.now()/1e3,id:e.id,type:"text",fromAdaptation:n,bandwidth:null}))}function of(){this.u=this.A=this.F=this.C=this.s=this.j=this.D=this.m=this.i=this.O=this.P=this.I=this.K=this.L=this.l=this.o=NaN,this.g=new Ql,this.h=new nf}function af(e,n){xo.call(this);var r=this;this.l=rh,this.Dc=this.h=null,this.ha=!1,this.Nc=new Oa,this.Wb=new Oa,this.o=new Oa,this.Qb=this.i=this.Oc=this.K=this.j=this.fb=this.L=this.Ne=this.W=this.gb=this.O=this.Kc=this.I=this.Bb=this.A=this.D=this.m=this.F=null,this.bc=!1,this.ud=this.s=null,this.Od=1e9,this.g=xf(this),this.Ld={width:1/0,height:1/0},this.u=null,this.yb=new Gs(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel),this.zb=this.g.preferredTextLanguage,this.ac=this.g.preferredTextRole,this.Zb=this.g.preferForcedSubs,this.Yb=[],this.cc=null,n&&n(this),this.W=function(t){return new Cl({getBandwidthEstimate:function(){return t.s?t.s.getBandwidthEstimate():NaN},Ma:function(){return t.Ma()},getCurrentTime:function(){return t.h?t.h.currentTime:0},Gc:function(){return t.Gc()},od:function(){return t.od()},Za:function(){return t.Za()},T:function(){return t.T()}},t.g.cmcd)}(this),this.F=function(t){return new Ro((function(e,n){t.s&&t.s.segmentDownloaded(e,n)}),(function(e,n,r){e=(new Map).set("headers",e).set("request",n).set("requestType",r),t.dispatchEvent(uf("downloadheadersreceived",e))}),(function(e,n,r,i){e=(new Map).set("request",e).set("error",n).set("httpResponseCode",r).set("aborted",i),t.dispatchEvent(uf("downloadfailed",e))}),(function(e,n,r){var i=t.W;if(r=void 0===r?{}:r,i.g.enabled)if("HEAD"===n.method)Nl(i,n);else switch(e){case 0:try{if(i.g.enabled){if(r.type){t:{switch(r.type){case 4:var o="d";break t;case 3:case 2:o="h";break t;case 5:o="s";break t}o=void 0}i.o=o}Nl(i,n,{ot:Ll,su:!i.i})}}catch(f){W("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",f)}break;case Lo:e=r;try{if(i.g.enabled){var a=e.segment;o=0,a&&(o=a.endTime-a.startTime);var s={d:1e3*o,st:i.h.T()?"l":"v"};s.ot=function(t){if(0===t.type)return Bl;if(t=t.stream){var e=t.type;if("video"==e)return t.codecs&&t.codecs.includes(",")?Dl:jl;if("audio"==e)return Ml;if("text"==e)return"application/mp4"===t.mimeType?Fl:Ul}}(e);var u=s.ot===jl||s.ot===Ml||s.ot===Dl||s.ot===Fl,c=e.stream;c&&(u&&(s.bl=function(t,e){if(!(e=t.h.Ma()[e]).length)return NaN;var n=t.h.getCurrentTime();return(t=e.find((function(t){return t.start<=n&&t.end>=n})))?1e3*(t.end-n):NaN}(i,c.type)),c.bandwidth&&(s.br=c.bandwidth/1e3)),u&&s.ot!==Fl&&(s.tb=function(t,e){var n=t.h.Za();if(!n.length)return NaN;t=n[0];for(var r=(n=l(n)).next();!r.done;r=n.next())"variant"===(r=r.value).type&&r.bandwidth>t.bandwidth&&(t=r);switch(e){case jl:return t.videoBandwidth||NaN;case Ml:return t.audioBandwidth||NaN;default:return t.bandwidth}}(i,s.ot)/1e3),Nl(i,n,s)}}catch(f){W("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}break;case 2:case 5:case 6:Nl(i,n,{ot:"k"});break;case 4:Nl(i,n,{ot:"o"})}}))}(this),this.F.Vd(this.g.streaming.forceHTTPS),this.C=null,ch&&(this.C=ch()),this.Nc.J(t,"online",(function(){Ff(r),r.Rd()})),this.P={name:"detach"},this.Z={name:"attach"},this.ja={name:"unload"},this.Pd={name:"manifest-parser"},this.Id={name:"manifest"},this.Ab={name:"media-source"},this.Bd={name:"drm-engine"},this.ca={name:"load"},this.Sd={name:"src-equals-drm-engine"},this.Cb={name:"src-equals"};var i=new Map;i.set(this.Z,(function(t,e){return wo(function(t,e,n){return null==e.mediaElement&&(e.mediaElement=n.mediaElement,t.Wb.J(e.mediaElement,"error",(function(){var e=Gf(t);e&&Hf(t,e)}))),t.h=e.mediaElement,Promise.resolve()}(r,t,e))})),i.set(this.P,(function(t){return t.mediaElement&&(r.Wb.Nb(),t.mediaElement=null),r.C&&r.C.release(),r.h=null,wo(t=Promise.resolve())})),i.set(this.ja,(function(t){return wo(cf(r,t))})),i.set(this.Ab,(function(t){return t=function(t,e){var n,r,i,o,a;return I((function(s){if(1==s.g)return n=t.g.textDisplayFactory,r=n(),t.Ed=n,i=function(t,e,n,r){return new au(t,e,n,r)}(e.mediaElement,r,(function(e,n,r){lf(t,e,n,r)}),t.L),i.configure(t.g.mediaSource),o=t.g.manifest,a=o.segmentRelativeVttTiming,i.O=a,E(s,i.F,2);t.D=i,T(s)}))}(r,t),wo(t)})),i.set(this.Pd,(function(t,e){return t=function(t,e,n){var r,i,o,a;return I((function(s){if(1==s.g)return e.mimeType=n.mimeType,e.uri=n.uri,r=e.uri,i=t.F,t.Qb=r,o=t,E(s,function(t,e,n,r){var i,o,a,s;return I((function(u){if(1==u.g)return r&&(i=Ea[r.toLowerCase()])?u.return(i):(o=wa(t))&&(a=Ta[o])?u.return(a):r?u.B(2):E(u,ba(t,e,n),3);if(2!=u.g&&(r=u.h)&&(s=Ea[r]))return u.return(s);throw new Yt(2,4,4e3,t)}))}(r,i,t.g.manifest.retryParameters,e.mimeType),2);o.Oc=s.h,t.K=t.Oc(),a=Ao(t.g.manifest),n.mediaElement&&"AUDIO"===n.mediaElement.nodeName&&(a.disableVideo=!0),t.K.configure(a),T(s)}))}(r,t,e),wo(t)})),i.set(this.Id,(function(t){return function(t,e){var n=e.uri;e=t.F,t.gb=new Ku((function(){return t.Ob()})),t.gb.addEventListener("regionadd",(function(e){e=e.region,Vf(t,"timelineregionadded",e),t.C&&t.C.onDashTimedMetadata(e)})),t.fb=null,t.g.streaming.observeQualityChanges&&(t.fb=new zu((function(){return t.Ma()})),t.fb.addEventListener("qualitychange",(function(e){var n=e.quality;e=e.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.codecs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",e),t.dispatchEvent(uf("mediaqualitychanged",n))})));var r={networkingEngine:e,filter:function(e){return Af(t,e)},makeTextStreamsForClosedCaptions:function(e){return function(t,e){for(var n=new Set,r=l(e.textStreams),i=r.next();!i.done;i=r.next())"application/cea-608"!=(i=i.value).mimeType&&"application/cea-708"!=i.mimeType||n.add(i.originalId);for(r=l(e.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions)for(var o=l(i.closedCaptions.keys()),a=o.next();!a.done;a=o.next())if(a=a.value,!n.has(a)){var s=a.startsWith("CC")?"application/cea-608":"application/cea-708",u=new Zo,c=i.closedCaptions.get(a);s={id:t.Od++,originalId:a,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:c,originalLanguage:c,label:null,type:ie,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},e.textStreams.push(s),n.add(a)}}(t,e)},onTimelineRegionAdded:function(e){var n=t.gb;t:{for(var r=l(n.g),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==e.schemeIdUri&&i.id==e.id&&i.startTime==e.startTime&&i.endTime==e.endTime){r=i;break t}r=null}null==r&&(n.g.add(e),e=new To("regionadd",new Map([["region",e]])),n.dispatchEvent(e))},onEvent:function(e){return t.dispatchEvent(e)},onError:function(e){return Hf(t,e)},isLowLatencyMode:function(){return t.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return t.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){t.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){t.j&&t.j.updateDuration()},newDrmInfo:function(e){var n=t.m?t.m.g:null;n&&t.m.s&&_f(t,n.keySystem,e)}},i=Date.now()/1e3;return new mo(function(){var e,o,a,s;return I((function(u){if(1==u.g)return e=t,E(u,t.K.start(n,r),2);if(e.i=u.h,o=uf("manifestparsed"),t.dispatchEvent(o),0==t.i.variants.length)throw new Yt(2,4,4036);!function(t){function e(t){return t.video&&t.audio||t.video&&t.video.codecs.includes(",")}t.variants.some(e)&&(t.variants=t.variants.filter(e))}(t.i),a=Date.now()/1e3,s=a-i,t.u.D=s,T(u)}))}(),(function(){return t.K.stop()}))}(r,t)})),i.set(this.Bd,(function(t){return t=function(t,e){var n,r;return I((function(i){return 1==i.g?(n=Date.now()/1e3,r=!0,t.m=df(t,{mc:t.F,onError:function(e){Hf(t,e)},ze:function(e){qf(t,e)},onExpirationUpdated:function(e,n){zf(t,e,n)},onEvent:function(e){t.dispatchEvent(e),"drmsessionupdate"==e.type&&r&&(r=!1,t.u.j=Date.now()/1e3-n,t.L&&((e=t.L).g&&e.h.classList.add("shaka-hidden")))}}),t.m.configure(t.g.drm),E(i,La(t.m,t.i.variants,t.i.offlineSessionIds),2)):3!=i.g?E(i,t.m.Xb(e.mediaElement),3):E(i,Af(t,t.i),0)}))}(r,t),wo(t)})),i.set(this.ca,(function(t,e){return wo(function(t,e,n){var r,i,o,a,s,u,c,f,h,d,p,g,m,y,v,b,w;return I((function(x){switch(x.g){case 1:for(e.startTime=n.startTime,null!=t.cc&&(e.startTime=t.cc,t.cc=null),r=e.mediaElement,i=e.uri,t.Qb=i,t.I=new Ou({Ic:function(){return r.playbackRate},Ec:function(){return r.defaultPlaybackRate},Wd:function(t){r.playbackRate=t},we:function(t){r.currentTime+=t}}),o=function(){return Cf(t)},a=function(){return Rf(t)},t.o.J(r,"playing",o),t.o.J(r,"pause",o),t.o.J(r,"ended",o),t.o.J(r,"ratechange",a),function(t,e){if(e.lcevc.enabled){var n=t.Za();n&&n[0]&&n[0].videoMimeType==lh.ts&&(Me()||navigator.userAgent.match(/Edge\//))&&(e.mediaSource.forceTransmux||K("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled.")),sf(t),null==t.L&&(t.L=new Ps(t.h,t.Ne,e.lcevc),t.D&&(t.D.L=t.L))}else sf(t)}(t,t.g),s=t.g.abrFactory,t.s&&t.ud==s||(t.ud=s,t.s=s(),"function"!=typeof t.s.setMediaElement&&(ai("AbrManager","Please use an AbrManager with setMediaElement function."),t.s.setMediaElement=function(){}),t.s.configure(t.g.abr)),t.yb=new Gs(t.g.preferredAudioLanguage,t.g.preferredVariantRole,t.g.preferredAudioChannelCount,t.g.preferredVideoHdrLevel,t.g.preferredAudioLabel),t.zb=t.g.preferredTextLanguage,t.ac=t.g.preferredTextRole,t.Zb=t.g.preferForcedSubs,Kf(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.s.init((function(e,n,r){t.j&&e!=t.j.j&&Pf(t,e,!0,void 0!==n&&n,void 0===r?0:r)})),t.s.setMediaElement(r),We(t.i,t.g.preferredVideoCodecs,t.g.preferredAudioCodecs,t.g.preferredAudioChannelCount,t.g.preferredDecodingAttributes),t.j=function(t){return new rc(t.i,{Hc:function(){return t.A?t.A.yc():0},getBandwidthEstimate:function(){return t.s.getBandwidthEstimate()},N:t.D,mc:t.F,onError:function(e){return Hf(t,e)},onEvent:function(e){return t.dispatchEvent(e)},Rf:function(){t.K&&t.K.update&&t.K.update()},Kd:function(e,n,r){t.A&&t.A.xe(),gf(t),e=(new Map).set("start",e).set("end",n).set("contentType",r),t.dispatchEvent(uf("segmentappended",e))},Qf:function(e,n){(n=n.Cd)&&t.fb&&function(t,e,n){var r=function(t,e){var n=t.g.get(e);return n||(n={oc:[],je:null,contentType:e},t.g.set(e,n)),n}(t,e.contentType);!function(t,e){if((t=t.h()[e.contentType])&&0=r)}))}else e.oc=[]}(t,r),t={Cd:e,position:n},0<=(e=(r=r.oc).findIndex((function(t){return t.position>=n})))?r.splice(e,r[e].position==n?1:0,t):r.push(t)}(t.fb,n,e)},fe:function(e,n){var r=t.m;if(r.h.parseInbandPsshEnabled&&!r.K&&["audio","video"].includes(e)){var i=0,o=l((n=new Ui(rt(n))).data);for(e=o.next();!e.done;e=o.next())i+=e.value.length;if(0==i)r=Promise.resolve();else{for(i=new Uint8Array(i),o=0,e=(n=l(n.data)).next();!e.done;e=n.next())e=e.value,i.set(e,o),o+=e.length;ja(r,"cenc",i),r=r.l}}else r=Promise.resolve();return r},Sf:function(e,n,r){lf(t,e,n,r)},kd:function(e,n){return t.kd(e,n)}})}(t),t.j.configure(t.g.streaming),t.l=ih,r.textTracks&&t.o.J(r.textTracks,"addtrack",(function(e){if(e.track&&"chapters"===(e=e.track).kind)hf(t,e)})),t.dispatchEvent(uf("streaming")),u=null,(c=t.j.j)||(u=Nf(t)?t.s.chooseVariant():null),f=[],d=l([(h=c||u).video,h.audio]),p=d.next();!p.done;p=d.next())(g=p.value)&&!g.segmentIndex&&f.push(g.createSegmentIndex());if(!(0, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),s.resolve()),t.o.oa(i,"error",(function(){s.reject(Gf(t))})),new mo(s,(function(){return s.reject(new Yt(2,7,7001)),Promise.resolve()})).ka((function(){t.T()&&t.g.streaming.liveSync&&t.o.J(i,"timeupdate",(function(){return kf(t)})),t.bc=!0}))}(r,t,e)})),this.hb=new hl(this.P,{rf:function(t,e,n,i){var o=null;return t==r.P&&(o=n==r.P?r.P:r.Z),t==r.Z&&(o=n==r.P||e.mediaElement!=i.mediaElement?r.P:n==r.Z?r.Z:n==r.Ab||n==r.ca?r.Ab:n==r.Cb?r.Sd:null),t==r.Ab&&(o=n==r.ca&&e.mediaElement==i.mediaElement?r.Pd:r.ja),t==r.Pd&&(o=Qf(r.ca,r.Id,r.ja,n,e,i)),t==r.Id&&(o=Qf(r.ca,r.Bd,r.ja,n,e,i)),t==r.Bd&&(o=Qf(r.ca,r.ca,r.ja,n,e,i)),t==r.Sd&&(o=n==r.Cb&&e.mediaElement==i.mediaElement?r.Cb:r.ja),t!=r.ca&&t!=r.Cb||(o=r.ja),t==r.ja&&(o=i.mediaElement&&e.mediaElement==i.mediaElement?r.Z:r.P),o},Ze:function(t,e,n){return r.dispatchEvent(uf("onstatechange",(new Map).set("state",t.name))),i.get(t)(e,n)},handleError:function(t){return I((function(e){return 1==e.g?E(e,cf(r,t),2):e.return(t.mediaElement?r.Z:r.P)}))},Pf:function(t){r.dispatchEvent(uf("onstateidle",(new Map).set("state",t.name)))}}),this.Mc=new Ie((function(){return function(t){function e(t){var e="";return t.video&&(e+="video:"+t.video.id),t.audio&&(e=e+(e?"&":"")+"audio:"+t.audio.id),e}for(var n=Date.now()/1e3,r=!1,i=l(t.i.variants),o=i.next();!o.done;o=i.next())0<(o=o.value).disabledUntilTime&&o.disabledUntilTime<=n&&(o.disabledUntilTime=0,r=!0,e(o));t.i.variants.every((function(t){return 0===t.disabledUntilTime}))&&t.Mc.stop(),r&&If(t,!0,void 0,!1,!1)}(r)})),e&&this.Xb(e,!0)}function sf(t){null!=t.L&&(t.L.release(),t.L=null)}function uf(t,e){return new To(t,e)}function cf(t,e){var n,r,i,o,a,s,u,c,f;return I((function(h){switch(h.g){case 1:return t.l!=nh&&(t.l=rh),n=t.Yb.map((function(t){return t()})),t.Yb=[],E(h,Promise.all(n),2);case 2:if(t.dispatchEvent(uf("unloading")),e.mimeType=null,e.startTime=null,e.uri=null,t.gb&&(t.gb.release(),t.gb=null),e.mediaElement&&t.o.Nb(),t.Mc.stop(),t.Bb&&(t.Bb.release(),t.Bb=null),t.Kc&&(t.Kc.stop(),t.Kc=null),!t.K){h.B(3);break}return E(h,t.K.stop(),4);case 4:t.K=null,t.Oc=null;case 3:if(!t.s){h.B(5);break}return E(h,t.s.stop(),5);case 5:if(!t.j){h.B(7);break}return E(h,t.j.destroy(),8);case 8:t.j=null;case 7:if(t.I&&(t.I.release(),t.I=null),t.A&&(t.A.release(),t.A=null),!t.D){h.B(9);break}return E(h,t.D.destroy(),10);case 10:t.D=null;case 9:if(t.C&&t.C.onAssetUnload(),!e.mediaElement||!e.mediaElement.src){h.B(11);break}return E(h,new Promise((function(t){return new Ie(t).V(.1)})),12);case 12:for(e.mediaElement.removeAttribute("src"),e.mediaElement.load();e.mediaElement.lastChild;)e.mediaElement.removeChild(e.mediaElement.firstChild);case 11:if(!t.m){h.B(13);break}return E(h,t.m.destroy(),14);case 14:t.m=null;case 13:if(t.Qb=null,t.O=null,t.i){for(r=l(t.i.variants),i=r.next();!i.done;i=r.next())for(o=i.value,a=l([o.audio,o.video]),s=a.next();!s.done;s=a.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=l(t.i.textStreams),s=c.next();!s.done;s=c.next())(f=s.value).segmentIndex&&f.segmentIndex.release()}t.i=null,t.u=new of,t.Ed=null,Of(t),T(h)}}))}function lf(t,e,n,r){for(var i=(e=l(e)).next();!i.done;i=e.next())if((i=i.value).data&&i.cueTime&&i.frames){var o=i.cueTime+n,a=r;a&&o>a&&(a=o);for(var s=l(i.frames),u=s.next();!u.done;u=s.next())ff(t,o,a,"org.id3",u.value);t.C&&t.C.onHlsTimedMetadata(i,o)}}function ff(t,e,n,r,i){e=(new Map).set("startTime",e).set("endTime",n).set("metadataType",r).set("payload",i),t.dispatchEvent(uf("metadata",e))}function hf(t,e){if(e&&"chapters"==e.kind){e.mode="hidden";var n=new Ie((function(){e.mode="hidden"})).Zd().V(.5);t.Yb.push((function(){n.stop()}))}}function df(t,e){return new Pa(e,t.g.drm.updateExpirationTime)}function pf(t,e){t.O=new qs,t.O.g=Ks,zs(t.O,e,Math.min(.5,e/2)),Of(t),t.Kc=new Ie((function(){gf(t)})).sa(.25)}function gf(t){switch(t.l){case oh:if(t.h.ended)var e=!0;else{var n=$s(t.h.buffered);e=null!=n&&n>=t.h.duration-1}break;case ih:t:if(t.h.ended||lu(t.D))e=!0;else{if(t.i.presentationTimeline.T()){n=t.i.presentationTimeline.lb();var r=$s(t.h.buffered);if(null!=r&&r>=n){e=!0;break t}}e=!1}break;default:e=!1}r=Qs(t.h.buffered,t.h.currentTime);var i=e,o=(n=t.O).h.get(n.g);e=n.g,r=i||r>=o?Ws:Ks,n.g=r,e!=r&&Of(t)}function mf(t){if(t.K){var e=Ao(t.g.manifest);t.h&&"AUDIO"===t.h.nodeName&&(e.disableVideo=!0),t.K.configure(e)}if(t.m&&t.m.configure(t.g.drm),t.j){t.j.configure(t.g.streaming);try{Sf(t,t.i)}catch(o){Hf(t,o)}t.s&&Nf(t),!(e=t.j.j)||e.allowedByApplication&&e.allowedByKeySystem||If(t)}if(t.F&&t.F.Vd(t.g.streaming.forceHTTPS),t.D&&(t.D.configure(t.g.mediaSource),t.D.O=t.g.manifest.segmentRelativeVttTiming,e=t.g.textDisplayFactory,t.Ed!=e)){var n=e(),r=t.D,i=r.u;r.u=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.g&&(r.g.j=n),t.Ed=e,t.j&&((n=(e=t.j).h.get(ie))&&sc(e,n.stream,!0,0,!0))}t.s&&(t.s.configure(t.g.abr),t.g.abr.enabled?t.s.enable():t.s.disable(),Uf(t)),t.O&&(e=t.g.streaming.rebufferingGoal,t.i&&(e=Math.max(e,t.i.minBufferTime)),zs(t.O,e,Math.min(.5,e/2))),t.i&&Kf(t.i.presentationTimeline,t.g.playRangeStart,t.g.playRangeEnd),t.C&&t.C.configure(t.g.ads),t.W&&t.W.configure(t.g.cmcd)}function yf(t){return Array.from(t.h.textTracks).filter((function(t){return"metadata"!=t.kind&&"chapters"!=t.kind&&"Shaka Player TextTrack"!=t.label}))}function vf(t){return Array.from(t.h.textTracks).filter((function(t){return"chapters"==t.kind}))}function bf(t,e){var n,r;return I((function(i){switch(i.g){case 1:return n=wa(e),(r=fh[n])?i.return(r):(x(i,2),E(i,ba(e,t.F,t.g.streaming.retryParameters),4));case 4:r=i.h,A(i,3);break;case 2:S(i);case 3:if(r)return i.return(r);throw new Yt(1,2,2011,n)}}))}function wf(t,e,n,r,i,o,a){var s,u,c,l;return I((function(f){if(1==f.g)return"text/vtt"!=i||a.length?E(f,Ef(t,e,t.F,t.g.streaming.retryParameters),3):f.B(2);2!=f.g&&(s=f.h,u=Tf(t,s,i,a),c=new Blob([u],{type:"text/vtt"}),e=Su(c),i="text/vtt"),l=document.createElement("track");var h=t.W,d=e;try{if(h.g.enabled){var p=kl(h);p.ot=Ul,p.su=!0;var g=Pl(d,Il(p))}else g=d}catch(m){W("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",m),g=d}return l.src=g,l.label=o,l.kind=r,l.srclang=n,t.h.getAttribute("crossorigin")||t.h.setAttribute("crossorigin","anonymous"),t.h.appendChild(l),f.return(l)}))}function Ef(t,e,n,r){var i,o,a;return I((function(s){if(1==s.g){i=Lo,(o=ko([e],r)).method="GET";var u=t.W;try{u.g.enabled&&Nl(u,o,{ot:Ul,su:!0})}catch(c){W("CMCD_TEXT_ERROR","Could not generate text CMCD data.",c)}return E(s,n.request(i,o).promise,2)}return a=s.h,s.return(a.data)}))}function Tf(t,e,n,r){var i=be[n];if(i)return n=i(),t={periodStart:0,segmentStart:0,segmentEnd:t.h.duration,vttOffset:0},e=rt(e),function(t,e){function n(t){for(var n=t,r=l(e),i=r.next();!i.done;i=r.next())(i=i.value).end&&i.start(t=Math.floor(n/3600))?"0":"")+t+":"+(10>(r=Math.floor(n/60%60))?"0":"")+r+":"+(10>(i=Math.floor(n%60))?"0":"")+i+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var r=yl(t);t="WEBVTT\n\n";for(var i=(r=l(r)).next();!i.done;i=r.next())t+=n((i=i.value).startTime)+" --\x3e "+n(i.endTime)+function(t){var e=[];switch(t.textAlign){case"left":e.push("align:left");break;case"right":e.push("align:right");break;case mt:e.push("align:middle");break;case"start":e.push("align:start");break;case"end":e.push("align:end")}switch(t.writingMode){case"vertical-lr":e.push("vertical:lr");break;case"vertical-rl":e.push("vertical:rl")}return e.length?" "+e.join(" "):""}(i)+"\n",t+=i.S+"\n\n";return t}(e=n.parseMedia(e,t),r);throw new Yt(2,2,2014,n)}function xf(t){var e=$l();return e.streaming.failureCallback=function(e){if(t.T()){var n=null;1001==e.code||1002==e.code?n=1:1003==e.code&&(n=.1),null!=n&&(e.severity=1,t.Rd(n))}},e.textDisplayFactory=function(){return t.Dc?new xl(t.h,t.Dc):new vl(t.h)},e}function Af(t,e){return I((function(n){if(1==n.g)return E(n,function(t,e){return I((function(n){if(1==n.g)return E(n,$e(t.j?t.j.j:null,e),2);Xf(e),T(n)}))}(t,e),2);Sf(t,e),T(n)}))}function Sf(t,e){if(t.l!=nh){for(var n=t.g.restrictions,r=t.Ld,i=!1,o=l(e.variants),a=o.next();!a.done;a=o.next()){var s=(a=a.value).allowedByApplication;a.allowedByApplication=Ze(a,n,r),s!=a.allowedByApplication&&(i=!0)}if(i&&t.j&&Mf(t),(n=t.m?t.m.g:null)&&t.m.s)for(i=(r=l(e.variants)).next();!i.done;i=r.next())i=i.value,_f(t,n.keySystem,i.video),_f(t,n.keySystem,i.audio);Wf(t,e)}}function _f(t,e,n){if(n)for(var r=(n=l(n.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==e)for(var i=(r=l(r.initData||[])).next();!i.done;i=r.next())i=i.value,ja(t.m,i.initDataType,i.initData)}function Of(t){var e=t.te();if(t.u&&t.O&&t.A){var n=t.I;n.j=e,Ru(n),t.W&&(n=t.W,e||n.i||(n.i=!0),n.i&&e&&(n.l=!0),n.m=e),Cf(t)}e=(new Map).set("buffering",e),t.dispatchEvent(uf("buffering",e))}function Rf(t){var e=t.h.playbackRate;0!=e&&(t.I&&t.I.set(e),e=uf("ratechange"),t.dispatchEvent(e))}function Cf(t){if(t.u&&t.O){var e=t.u.g;t.O.g==Ks?tf(e,"buffering"):t.h.paused?tf(e,"paused"):t.h.ended?tf(e,"ended"):tf(e,"playing")}}function kf(t){if(t.T()){var e=t.Ob();if(Number.isFinite(e.end)&&!(t.h.currentTimen?i!=r&&t.Me(r):1!==i&&0!==i&&t.ge()}}}function Nf(t){try{Wf(t,t.i)}catch(n){return Hf(t,n),!1}var e=function(t){return t.filter((function(t){return pn(t)}))}(t.i.variants);return e=t.yb.create(e),t.s.setVariants(Array.from(e.values())),!0}function If(t,e,n,r,i){var o;e=void 0===e||e,n=void 0===n?0:n,r=void 0!==r&&r,i=void 0===i||i,(o=Nf(t)?t.s.chooseVariant():null)&&Pf(t,o,i,e,n,r)}function Pf(t,e,n,r,i,o){o=void 0!==o&&o;var a=t.j.j;if(e==a)r&&oc(t.j,e,r,i,!0);else{var s=t.u.h;s.h!=e&&(s.h=e,s.g.push({timestamp:Date.now()/1e3,id:e.id,type:"variant",fromAdaptation:n,bandwidth:e.bandwidth})),oc(t.j,e,r,i,o,n),r=null,a&&(r=sn(a)),e=sn(e),n?(n=(new Map).set("oldTrack",r).set("newTrack",e),t.L&&Ls(t.L,e),Yf(t,n=uf("adaptation",n))):jf(t,r,e)}}function Lf(t,e){var n=Array.from(t.h.audioTracks).find((function(t){return t.enabled}));e.enabled=!0,e.id!==n.id&&(n.enabled=!1),jf(t,n=hn(n),e=hn(e))}function Mf(t){Yf(t,uf("trackschanged"))}function jf(t,e,n){e=(new Map).set("oldTrack",e).set("newTrack",n),t.L&&Ls(t.L,n),Yf(t,n=uf("variantchanged",e))}function Df(t){Yf(t,uf("textchanged"))}function Bf(t){Yf(t,uf("texttrackvisibility"))}function Uf(t){t.g.abr.enabled||Ff(t),Yf(t,uf("abrstatuschanged",(new Map).set("newStatus",t.g.abr.enabled)))}function Ff(t,e){if(e=void 0===e||e,t.l==ih){t.Mc.stop();for(var n=l(t.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;e&&Nf(t)}}function Hf(t,e){if(t.l!=nh){2===e.severity&&Ff(t,!1);var n=uf("error",(new Map).set("detail",e));t.dispatchEvent(n),n.defaultPrevented&&(e.handled=!0)}}function Vf(t,e,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),t.dispatchEvent(uf(e,n))}function Gf(t){if(!t.h.error)return null;var e=t.h.error.code;if(1==e)return null;var n=t.h.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new Yt(2,3,3016,e,n,t.h.error.message)}function qf(t,e){if(t.j){var n=Object.keys(e),r=1==n.length&&"00"==n[0],i=!1;if(n.length)for(var o=(n=l(t.i.variants)).next();!o.done;o=n.next()){var a=[];(o=o.value).audio&&a.push(o.audio),o.video&&a.push(o.video);for(var s=(a=l(a)).next();!s.done;s=a.next()){var u=s.value;if(s=o.allowedByKeySystem,u.keyIds.size){o.allowedByKeySystem=!0;for(var c=(u=l(u.keyIds)).next();!c.done;c=u.next())c=c.value,c=e[r?"00":c],o.allowedByKeySystem=o.allowedByKeySystem&&!!c&&!sh.includes(c)}s!=o.allowedByKeySystem&&(i=!0)}}i&&!Nf(t)||((e=t.j.j)&&!e.allowedByKeySystem&&If(t),i&&Mf(t))}}function zf(t,e,n){t.K&&t.K.onExpirationUpdated&&t.K.onExpirationUpdated(e,n),e=uf("expirationupdated"),t.dispatchEvent(e)}function Kf(t,e,n){0"===(n=n.trim()).substr(0,5)&&""===n.substr(-6)&&(n=n.slice(5,-6),t=!0);try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,t=!0),r.CkcMessage&&(n=r.CkcMessage,t=!0),r.License&&(n=r.License,t=!0)}catch(i){}t&&(e.data=nt(Ci(n)))}},zl.expressplayFairPlayRequest=function(t,e){Yl(t,e)},zl.conaxFairPlayRequest=function(t,e){Yl(t,e)},zl.ezdrmFairPlayRequest=function(t,e){Yl(t,e)},zl.verimatrixFairPlayRequest=function(t,e){2===t&&(t=Ri(t=rt(e.body)),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=Nr("spc="+t))},zl.expressplayInitDataTransform=function(t,e,n){return Xl(t,e,n)},zl.conaxInitDataTransform=function(e,n,r){if("skd"!==n)return e;n=r.serverCertificate,r=kr(e).split("skd://").pop().split("?").shift(),r=t.atob(r);var i=new ArrayBuffer(2*r.length);i=new Uint16Array(i);for(var o=0,a=r.length;o=(e=Math.min(this.h.currentTime+e,this.Ob().end)))return 1;if(!(t<=this.h.currentTime)&&tt(o,e))&&(n=o);n?(t=sn(n),this.Ud(t,!0,r)):If(this)}else this.h&&this.h.audioTracks&&(r=mn(this.Za(),t,e||"",!1)[0])&&this.Ud(r)},r.Ee=function(t,e,n){n=void 0!==n&&n,this.i&&this.A?(this.zb=t,this.ac=e||"",this.Zb=n,(t=mn(this.i.textStreams,this.zb,this.ac,this.Zb)[0]||null)&&t!=this.j.o&&(rf(this.u.h,t,!1),this.g.streaming.alwaysStreamText||this.td())&&(ac(this.j,t),Df(this))):(t=mn(this.Gb(),t,e||"",n)[0])&&this.Fe(t)},r.bg=function(t,e,n){if(e=void 0===e||e,n=void 0===n?0:n,this.i&&this.A){for(var r=null,i=l(this.i.variants),o=i.next();!o.done;o=i.next())if((o=o.value).audio.label==t){r=o;break}null!=r&&(this.yb=new Gs(r.language,"",0,"",t),If(this,e,n))}else if(this.h&&this.h.audioTracks){for(e=null,r=(n=l(n=Array.from(this.h.audioTracks))).next();!r.done;r=n.next())(r=r.value).label==t&&(e=r);e&&Lf(this,e)}},r.td=function(){var t=this.ha;return this.D?this.D.u.isTextVisible():this.h&&this.h.src&&this.h.textTracks?yf(this).some((function(t){return"showing"==t.mode})):t},r.oe=function(){return this.h&&this.h.src&&this.h.textTracks?vf(this).map((function(t){return fn(t)})):[]},r.ef=function(t){var e=Ae(t),n=vf(this).filter((function(t){return Ae(t.language)==e}));if(!n||!n.length)return[];t=[];for(var r=new Set,i=(n=l(n)).next();!i.done;i=n.next())if((i=i.value)&&i.cues)for(var o=(i=l(i.cues)).next();!o.done;o=i.next()){var a=o.value;(o=a.id)&&""!=o||(o=a.startTime+"-"+a.endTime+"-"+a.text),a={id:o,title:a.text,startTime:a.startTime,endTime:a.endTime},r.has(o)||(t.push(a),r.add(o))}return t},r.fg=function(t){if(t=!!t,this.ha!=t){if(this.ha=t,this.l==ih)this.D.u.setTextVisibility(t),this.g.streaming.alwaysStreamText||(t?this.j.o||0<(t=mn(this.i.textStreams,this.zb,this.ac,this.Zb)).length&&(ac(this.j,t[0]),Df(this)):function(t){var e=t.h.get(ie);e&&(vc(e),bc(e).catch((function(){})),t.h.delete(ie)),t.o=null}(this.j));else if(this.h&&this.h.src&&this.h.textTracks)for(var e=yf(this),n=(e=l(e)).next();!n.done;n=e.next())"disabled"!=(n=n.value).mode&&(n.mode=t?"showing":"hidden");Bf(this)}},r.tf=function(){if(!this.T())return null;var t=this.hb.l,e=0;if(this.A)e=this.A.yc();else if(t){if(null==t.startTime)return new Date;e=t.startTime}return this.i?new Date(1e3*(this.i.presentationTimeline.i+e)):this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},r.pe=function(){if(!this.T())return null;if(this.i)return new Date(1e3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var t=this.h.getStartDate();return isNaN(t.getTime())?null:t}return null},r.Ma=function(){if(this.l==ih)return this.D.Ma();var t={total:[],audio:[],video:[],text:[]};return this.l==oh&&(t.total=tu(this.h.buffered)),t},r.getStats=function(){if(this.l!=ih&&this.l!=oh)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Cf(this);var t=this.h,e=t.currentTime/t.duration;if(!isNaN(e)){var n=this.u;e=Math.round(100*e),n.i=isNaN(n.i)?e:Math.max(n.i,e)}if(this.A&&(this.u.O=this.A.ce(),this.u.P=this.A.de()),t.getVideoPlaybackQuality){n=t.getVideoPlaybackQuality(),e=this.u;var r=Number(n.totalVideoFrames);e.L=Number(n.droppedVideoFrames),e.K=r,this.u.I=Number(n.corruptedVideoFrames)}this.m?n=(n=this.m).I?n.I:NaN:n=NaN,this.u.s=n,this.l==ih&&((n=this.j.j)&&(this.u.A=(this.I?this.I.i:1)*n.bandwidth),n&&n.video&&(e=this.u,r=n.video.height||NaN,e.o=n.video.width||NaN,e.l=r),this.T()&&(n=this.pe().valueOf()+1e3*this.Ob().end,this.u.C=(Date.now()-n)/1e3),this.i&&this.i.presentationTimeline&&(this.u.F=this.i.presentationTimeline.g),n=this.s.getBandwidthEstimate(),this.u.u=n),this.l==oh&&(n=this.u,e=t.videoHeight||NaN,n.o=t.videoWidth||NaN,n.l=e);var i=this.u;t=i.o,n=i.l,e=i.A,r=i.K;for(var o=i.L,a=i.I,s=i.P,u=i.O,c=i.u,f=i.i,h=i.m,d=i.D,p=i.j,g=ef(i.g,"playing"),m=ef(i.g,"paused"),y=ef(i.g,"buffering"),v=i.s,b=i.C,w=i.F,E=function(t){function e(t){return{timestamp:t.timestamp,state:t.state,duration:t.duration}}for(var n=[],r=l(t.h),i=r.next();!i.done;i=r.next())n.push(e(i.value));return t.g&&n.push(e(t.g)),n}(i.g),T=[],x=(i=l(i.h.g)).next();!x.done;x=i.next())x=x.value,T.push({timestamp:x.timestamp,id:x.id,type:x.type,fromAdaptation:x.fromAdaptation,bandwidth:x.bandwidth});return{width:t,height:n,streamBandwidth:e,decodedFrames:r,droppedFrames:o,corruptedFrames:a,stallsDetected:s,gapsJumped:u,estimatedBandwidth:c,completionPercent:f,loadLatency:h,manifestTimeSeconds:d,drmTimeSeconds:p,playTime:g,pauseTime:m,bufferingTime:y,licenseTime:v,liveLatency:b,maxSegmentDuration:w,stateHistory:E,switchHistory:T}},r.Re=function(t,e,n,r,i,o,a){a=void 0!==a&&a;var s,u,c,l,f,h,d,p,g,m,y=this;return I((function(v){switch(v.g){case 1:if(y.l!=ih&&y.l!=oh)throw new Yt(1,7,7004);if(r){v.B(2);break}return E(v,bf(y,t),3);case 3:r=v.h;case 2:if(s=[],y.C)try{s=y.C.getServerSideCuePoints()}catch(b){}if(y.l!=oh){v.B(4);break}return a&&(n="forced"),E(v,wf(y,t,e,n,r,o||"",s),5);case 5:if(u=y.Gb(),c=u.find((function(t){return t.language==e&&t.label==(o||"")&&t.kind==n})))return Mf(y),v.return(c);throw new Yt(1,2,2012);case 4:if(l=oe,1/0==(f=y.i.presentationTimeline.getDuration()))throw new Yt(1,4,4033);if(!s.length){v.B(6);break}return E(v,Ef(y,t,y.F,y.g.streaming.retryParameters),7);case 7:h=v.h,d=Tf(y,h,r,s),p=new Blob([d],{type:"text/vtt"}),t=Su(p),r="text/vtt";case 6:if(g={id:y.Od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xo(0,f,[t]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:e,originalLanguage:e,label:o||null,type:l.da,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!a,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0},m=ue(g.mimeType,g.codecs),!me(m))throw new Yt(2,2,2014,r);return y.i.textStreams.push(g),Mf(y),v.return(un(g))}}))},r.Se=function(t,e){var n,r,i,o,a,s,u,c,f,h,d,p,g,m,y,v,b=this;return I((function(w){switch(w.g){case 1:if(b.l!=ih&&b.l!=oh)throw new Yt(1,7,7004);if(b.l==oh)throw new Yt(1,2,2016);if(e){w.B(2);break}return E(w,bf(b,t),3);case 3:e=w.h;case 2:if("text/vtt"!=e)throw new Yt(1,2,2017,t);if(n=oe,1/0==(r=b.i.presentationTimeline.getDuration()))throw new Yt(1,4,4045);return E(w,Ef(b,t,b.F,b.g.streaming.retryParameters),4);case 4:if(i=w.h,!(o=be[e]))throw new Yt(2,2,2014,e);for(a=o(),s={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},u=rt(i),c=a.parseMedia(u,s),f=[],h={},d=l(c),p=d.next();!p.done;h={Rb:h.Rb},p=d.next())g=p.value,h.Rb=te([t],[g.S])[0],m=new Go(g.startTime,g.endTime,function(t){return function(){return[t.Rb]}}(h),0,null,null,0,0,1/0),h.Rb.includes("#xywh")&&(4===(y=h.Rb.split("#xywh=")[1].split(",")).length&&m.Ie({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],10)})),f.push(m);return v={id:b.Od++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Wo(f),mimeType:e||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.fd,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0},b.i.imageStreams.push(v),Mf(b),w.return(cn(v))}}))},r.Qe=function(t,e,n){var r,i,o,a,s=this;return I((function(u){switch(u.g){case 1:if(s.l!=ih&&s.l!=oh)throw new Yt(1,7,7004);if(n){u.B(2);break}return E(u,bf(s,t),3);case 3:n=u.h;case 2:if(r=[],s.C)try{r=s.C.getServerSideCuePoints()}catch(c){}return E(u,wf(s,t,e,"chapters",n,"",r),4);case 4:if(i=u.h,o=s.oe(),!(a=o.find((function(t){return t.language==e})))){u.B(5);break}return E(u,new Promise((function(t,e){s.o.oa(i,"load",t),s.o.oa(i,"error",(function(){e(new Yt(1,2,2015))}))})),6);case 6:return u.return(a);case 5:throw new Yt(1,2,2012)}}))},r.dg=function(t,e){this.Ld.width=t,this.Ld.height=e},r.Rd=function(t){if(this.l==ih){var e=this.j;if(t=void 0===t?.1:t,e.l.g)e=!1;else if(e.s)e=!1;else{for(var n=l(e.h.values()),r=n.next();!r.done;r=n.next())!(r=r.value).kc||r.pa||r.Ha||(r.kc=!1,yc(e,r,t));e=!0}}else e=!1;return e},r.lf=function(){return K("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},r.mf=function(){return this.Oc},r.gg=function(t){this.Dc=t},r.kd=function(t,e){if(!this.g.abr.enabled||this.l===nh||!navigator.onLine)return!1;if(this.i.variants.some((function(e){return!(!(e=e[t.type])||e.id===t.id)&&("audio"!=t.type||t.language===e.language)}))){for(var n=l(this.i.variants),r=n.next();!r.done;r=n.next()){var i=(r=r.value)[t.type];i&&i.id===t.id&&(r.disabledUntilTime=Date.now()/1e3+e)}return this.Mc.sa(1),If(this,!0,e=this.Ma().video.reduce((function(t,e){return t+e.end-e.start}),0),!0,!1),!0}return!1},F("shaka.Player",af),af.prototype.setVideoContainer=af.prototype.gg,af.prototype.getManifestParserFactory=af.prototype.mf,af.prototype.getManifest=af.prototype.lf,af.prototype.retryStreaming=af.prototype.Rd,af.prototype.setMaxHardwareResolution=af.prototype.dg,af.prototype.addChaptersTrack=af.prototype.Qe,af.prototype.addThumbnailsTrack=af.prototype.Se,af.prototype.addTextTrackAsync=af.prototype.Re,af.prototype.getStats=af.prototype.getStats,af.prototype.getBufferedInfo=af.prototype.Ma,af.prototype.getPresentationStartTimeAsDate=af.prototype.pe,af.prototype.getPlayheadTimeAsDate=af.prototype.tf,af.prototype.setTextTrackVisibility=af.prototype.fg,af.prototype.getChapters=af.prototype.ef,af.prototype.getChaptersTracks=af.prototype.oe,af.prototype.isTextTrackVisible=af.prototype.td,af.prototype.selectVariantsByLabel=af.prototype.bg,af.prototype.selectTextLanguage=af.prototype.Ee,af.prototype.selectAudioLanguage=af.prototype.De,af.prototype.getTextLanguages=af.prototype.vf,af.prototype.getAudioLanguages=af.prototype.bf,af.prototype.getTextLanguagesAndRoles=af.prototype.wf,af.prototype.getAudioLanguagesAndRoles=af.prototype.cf,af.prototype.selectVariantTrack=af.prototype.Ud,af.prototype.selectTextTrack=af.prototype.Fe,af.prototype.getThumbnails=af.prototype.yf,af.prototype.getImageTracks=af.prototype.jf,af.prototype.getTextTracks=af.prototype.Gb,af.prototype.getVariantTracks=af.prototype.Za,af.prototype.cancelTrickPlay=af.prototype.ge,af.prototype.trickPlay=af.prototype.Me,af.prototype.getPlaybackRate=af.prototype.Gc,af.prototype.isBuffering=af.prototype.te,af.prototype.getKeyStatuses=af.prototype.Fc,af.prototype.getActiveSessionsMetadata=af.prototype.ld,af.prototype.getExpiration=af.prototype.nd,af.prototype.drmInfo=af.prototype.drmInfo,af.prototype.keySystem=af.prototype.keySystem,af.prototype.goToLive=af.prototype.Df,af.prototype.seekRange=af.prototype.Ob,af.prototype.isAudioOnly=af.prototype.Gf,af.prototype.isInProgress=af.prototype.Hb,af.prototype.isLive=af.prototype.T,af.prototype.getAdManager=af.prototype.$e,af.prototype.getAssetUri=af.prototype.af,af.prototype.getNetworkingEngine=af.prototype.od,af.prototype.getMediaElement=af.prototype.qf,af.prototype.getManifestType=af.prototype.nf,af.prototype.getLoadMode=af.prototype.kf,af.prototype.resetConfiguration=af.prototype.Yf,af.prototype.getBufferFullness=af.prototype.df,af.prototype.getConfiguration=af.prototype.getConfiguration,af.prototype.configure=af.prototype.configure,af.prototype.load=af.prototype.load,af.prototype.updateStartTime=af.prototype.mg,af.prototype.unload=af.prototype.ig,af.prototype.detach=af.prototype.detach,af.prototype.attachCanvas=af.prototype.Te,af.prototype.attach=af.prototype.Xb,af.probeSupport=function(t){var e,n,r,i,o;return t=void 0===t||t,I((function(a){if(1==a.g)return e={},t?E(a,function(){var t,e,n,r,i,o;return I((function(a){return 1==a.g?(t="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:e}],r=new Map,i=function(t){var e,i,o;return I((function(a){switch(a.g){case 1:if(x(a,2),"org.w3.clearkey"===t&&He())throw Error("Unsupported keySystem");return E(a,navigator.requestMediaKeySystemAccess(t,n),4);case 4:return e=a.h,o=!!(i=e.getConfiguration().sessionTypes)&&i.includes("persistent-license"),Ve("Tizen 3")&&(o=!1),r.set(t,{persistentState:o}),E(a,e.createMediaKeys(),5);case 5:A(a,0);break;case 2:S(a),r.set(t,null),T(a)}}))},o=t.map((function(t){return i(t)})),E(a,Promise.all(o),2)):a.return(Na(r))}))}(),3):a.B(2);2!=a.g&&(e=a.h);var s={};if(Pe()){for(var u in Ea)s[u]=!0;for(var c in Ta)s[c]=!0}u={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var h=(c=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!h.done;h=c.next())s[h=h.value]=Pe()?!!Ea[h]:Le(h);for(var d in u)s[d]=Pe()?!!Ta[d]:Le(u[d]);for(n=s,s={},u=(d=l(d='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(f(pe)))).next();!u.done;u=d.next())s[u=u.value]=Pe()?!!me(u)||(Y(u)||!!Rt(u)):Le(u),s[c=u.split(";")[0]]=s[c]||s[u];for(o in r={manifest:n,media:s,drm:e},i=uh)r[o]=i[o]();return a.return(r)}))},af.isBrowserSupported=function(){if(t.Promise||K("A Promise implementation or polyfill is required"),!(t.Promise&&t.Uint8Array&&Array.prototype.forEach)||Ve("Trident/"))return!1;var e=He();return!(e&&13>e||!(t.MediaKeys&&t.navigator&&t.navigator.requestMediaKeySystemAccess&&t.MediaKeySystemAccess&&t.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Pe()||Le("application/x-mpegurl"))},af.setAdManagerFactory=function(t){ch=t},af.registerSupportPlugin=function(t,e){uh[t]=e},af.prototype.destroy=af.prototype.destroy;var nh=0,rh=1,ih=2,oh=3;af.LoadMode={DESTROYED:nh,NOT_LOADED:rh,MEDIA_SOURCE:ih,SRC_EQUALS:oh},af.version="4.4.2-npm-dirty";var ah=["","4"];ci=new function(t){this.g=t,this.i=si,this.h=ui}(new oi(Number(ah[0]),Number(ah[1])));var sh=["output-restricted","internal-error"],uh={},ch=null,lh={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},fh={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function hh(){}function dh(t,e){for(t={priority:e||0,Ue:t},e=0;e>>5)-n)?{Lc:n,M:t}:null}function kd(t,e){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(60&t[e+2])>>>2;if(r>n.length-1)return null;var i=1+((192&t[e+2])>>>6),o=(1&t[e+2])<<2;return o|=(192&t[e+3])>>>6,{sampleRate:n[r],channelCount:o,Bc:"mp4a.40."+i}}function Nd(t,e){if(e+1=t.length)return!1;var r=(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5;return!(r<=n)&&((e+=r)===t.length||e+1t.length||11!==t[e]||119!==t[e+1])return null;var n=t[e+4]>>6;if(3<=n)return null;var r=63&t[e+4],i=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*r+n];if(e+i>t.length)return null;var o=t[e+6]>>5,a=0;2===o?a+=2:(1&o&&1!==o&&(a+=2),4&o&&(a+=2)),a=(t[e+6]<<8|t[e+7])>>12-a&1;var s=7&t[e+5];return t=new Uint8Array([n<<6|t[e+5]>>3<<1|s>>2,(3&s)<<6|o<<3|a<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+a,Y:t,M:i}}function Ld(t,e){if(11===t[e]&&119===t[e+1]){var n,r,i=0,o=5;for(e+=o;0>>24+s<>s,i=i?i<i)return!0}return!1}function Md(t){this.i=t,this.h=0,this.g=new Map}function jd(t,e){if(e+8>t.length||2935!=(t[e]<<8|t[e+1]))return null;var n=new li(t.subarray(e+2));hi(n,2),hi(n,3);var r=di(n,11)+1<<1,i=di(n,2);if(3==i){i=[24e3,22060,16e3][i=di(n,2)];var o=3}else i=[48e3,44100,32e3][i],o=di(n,2);var a=di(n,3),s=di(n,1);return n=di(n,5),e+r>t.byteLength?null:(t=Math.floor(r*i/(16*[1,2,3,6][o])),t=new Uint8Array([(8160&t)>>5,(31&t)<<3,i<<6|n<<1,a<<1|s,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][a]+s,Y:t,M:r})}function Dd(t){this.i=t,this.h=0,this.g=new Map}function Bd(t){for(var e=!1,n=new Uint8Array([]),r=t.find((function(t){return 7==t.type})),i=!1,o=(t=l(t)).next();!o.done;o=t.next()){var a=!1;switch((o=o.value).type){case 1:a=i=!0;var s=o.data;r&&4>24&255,s[1]=a>>16&255,s[2]=a>>8&255,s[3]=255&a,n=Ii(n,s,o.La))}return n.byteLength?{data:n,ve:e}:null}dh(qh),hh.PiPWebkit=id,id.install=od,dh(od),hh.RandomUUID=fd,fd.install=hd,dh(hd),hh.StorageEstimate=pd,pd.install=gd,dh(gd),hh.Symbol=yd,yd.install=vd,dh(vd),hh.VideoPlayPromise=wd,wd.install=Ed,dh(Ed),hh.VideoPlaybackQuality=Td,Td.install=xd,dh(xd),hh.VTTCue=Sd,Sd.install=_d,dh(_d),(r=Id.prototype).destroy=function(){this.g.clear()},r.isSupported=function(t){return"audio/aac"==t.toLowerCase().split(";")[0]&&Y(this.convertCodecs("audio",t))},r.convertCodecs=function(t,e){return"audio/aac"==e.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(he(e)||"mp4a.40.2")+'"':e},r.getOrginalMimeType=function(){return this.i},r.transmux=function(t,e,n,r){for(var i=rt(t),o=Si(i),a=o.length;a>3&3,r=t[e+1]>>1&3,i=t[e+2]>>4&15,o=t[e+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==o){var a=t[e+3]>>6;i=1e3*Vd[14*(3===n?3-r:3===r?3:4)+i-1],o=Gd[3*(3===n?0:2===n?1:2)+o],n=qd[n][r];var s=zd[r],u=Math.floor(n*i/o+(t[e+2]>>1&1))*s,c=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(c=c?parseInt(c[1],10):0)&&87>=c&&2===r&&224e3<=i&&0===a&&(t[e+3]|=128),{sampleRate:o,channelCount:3===a?1:2,M:u,ag:8*n*s}}return null}function Hd(t,e){return!(255!==t[e]||224&~t[e+1]||!(6&t[e+1]))}var Vd=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Gd=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],qd=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],zd=[0,1,1,4];function Kd(t){this.i=t,this.h=0,this.g=new Map}function Wd(t){this.h=t,this.g=null}function Xd(t){this.h=t,(this.g=Is.get("ISOBoxer")())&&function(t){function e(){this._procFullBox(),1&this.flags&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,(function(t){this._procEntryField(t,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(t,"NumberOfEntries","uint",16),this._procSubEntries(t,"clearAndCryptedData",t.NumberOfEntries,(function(t){this._procEntryField(t,"BytesOfClearData","uint",16),this._procEntryField(t,"BytesOfEncryptedData","uint",32)})))}))}t.g.addBoxProcessor("saio",(function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)})),t.g.addBoxProcessor("saiz",(function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)})),t.g.addBoxProcessor("senc",e),t.g.addBoxProcessor("uuid",(function(){for(var t=!0,n=0;16>n;n++)this.usertype[n]!==Zd[n]&&(t=!1);t&&(this._parsing&&(this.type="sepiff"),e.call(this))}))}(this)}function Yd(t,e){for(var n=8,r=0;r>4).toString(16),n+=(15&i).toString(16),e=e.replace(t[0],n)}return e}function Qd(t){this.j=t,this.g=0,this.h=new Map,this.i=null}Ot("mss/audio/mp4",(function(){return new Xd("mss/audio/mp4")}),kt),Ot("mss/video/mp4",(function(){return new Xd("mss/video/mp4")}),kt),(r=$d.prototype).destroy=function(){this.g&&this.g.dispose(),this.g=null},r.isSupported=function(t,e){var n="mp2t"==t.toLowerCase().split(";")[0].split("/")[1];return!(!this.j||!n)&&(e?Y(Jd(e,t)):(e=Jd("audio",t),t=Jd("video",t),Y(e)||Y(t)))},r.convertCodecs=function(t,e){return"mp2t"==e.toLowerCase().split(";")[0].split("/")[1]?Jd(t,e):e},r.getOrginalMimeType=function(){return this.m},r.transmux=function(t){return this.i=!0,this.h=new go,this.l=[],t=rt(t),this.g.push(t),this.g.flush(),this.i&&this.h.reject(new Yt(2,3,3018)),this.h},F("shaka.transmuxer.MuxjsTransmuxer",$d),$d.prototype.transmux=$d.prototype.transmux,$d.prototype.getOrginalMimeType=$d.prototype.getOrginalMimeType,$d.prototype.convertCodecs=$d.prototype.convertCodecs,$d.prototype.isSupported=$d.prototype.isSupported,$d.prototype.destroy=$d.prototype.destroy,Ot("video/mp2t",(function(){return new $d("video/mp2t")}),kt),(r=Qd.prototype).destroy=function(){this.h.clear()},r.isSupported=function(t,e){if("video/mp2t"!=t.toLowerCase().split(";")[0])return!1;var n=he(t).split(","),r=re("audio",n);return n=re("video",n),!(r&&n||r&&(r=fe(r),!np.includes(r))||n&&(r=fe(n),!rp.includes(r)))&&(e?Y(this.convertCodecs(e,t)):(e=this.convertCodecs("audio",t),t=this.convertCodecs("video",t),Y(e)||Y(t)))},r.convertCodecs=function(t,e){return"video/mp2t"==e.toLowerCase().split(";")[0]?(e=he(e).replace("mp4a.40.34","mp3"),"audio"==t?'audio/mp4; codecs="'+e+'"':'video/mp4; codecs="'+e+'"'):e},r.getOrginalMimeType=function(){return this.j},r.transmux=function(t,e,n,r,i){this.i?this.i.clearData():this.i=new Pi,t=rt(t);var o=this.i.parse(t);t=[];var a=o.md();try{if(n=null,"video"==i){if("avc"===a.video){for(var s=[],u=null,c=[],h=o.Jc(),d=0;di?16:64)}if(gi(n),0===(r=mi(n)))mi(n);else if(1===r)for(hi(n,1),gi(n),gi(n),r=mi(n),i=0;i>>8&255),i.push(255&e.byteLength),i=i.concat.apply(i,f(e)),e=[],t=t.La,e.push(t.byteLength>>>8&255),e.push(255&t.byteLength),e=e.concat.apply(e,f(t)),{height:n,width:r,ga:t=new Uint8Array([1,i[3],i[4],i[5],255,225].concat(i,[1],e))}}(c);if(!v||null==u)throw new Yt(2,3,3018);e.height=v.height,e.width=v.width,n={id:e.id,type:"video",codecs:"avc1",encrypted:e.encrypted&&0{"use strict";function r(t,e){var n=e&&e.cache?e.cache:l,r=e&&e.serializer?e.serializer:u;return(e&&e.strategy?e.strategy:s)(t,{cache:n,serializer:r})}function i(t,e,n,r){var i,o=null==(i=r)||"number"==typeof i||"boolean"==typeof i?r:n(r),a=e.get(o);return void 0===a&&(a=t.call(this,r),e.set(o,a)),a}function o(t,e,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),o=e.get(i);return void 0===o&&(o=t.apply(this,r),e.set(i,o)),o}function a(t,e,n,r,i){return n.bind(e,t,r,i)}function s(t,e){return a(t,this,1===t.length?i:o,e.cache.create(),e.serializer)}n.d(e,{A:()=>f,H:()=>r});var u=function(){return JSON.stringify(arguments)};function c(){this.cache=Object.create(null)}c.prototype.get=function(t){return this.cache[t]},c.prototype.set=function(t,e){this.cache[t]=e};var l={create:function(){return new c}},f={variadic:function(t,e){return a(t,this,o,e.cache.create(),e.serializer)},monadic:function(t,e){return a(t,this,i,e.cache.create(),e.serializer)}}},264100:(t,e,n)=>{"use strict";n.d(e,{T:()=>i});var r=n(216386);function i(t,e){for(var n="",r=0;r>1),c=o(e);for("H"!=c&&"k"!=c||(u=0);u-- >0;)n+="a";for(;s-- >0;)n=c+n}else n+="J"===i?"H":i}return n}function o(t){var e=t.hourCycle;if(void 0===e&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,i=t.language;return"root"!==i&&(n=t.maximize().region),(r._[n||""]||r._[i||""]||r._["".concat(i,"-001")]||r._["001"])[0]}},853219:(t,e,n)=>{"use strict";var r;n.d(e,{o:()=>r}),function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(r||(r={}))},363014:(t,e,n)=>{"use strict";n.d(e,{HI:()=>a.HI,Ii:()=>a.Ii,Jo:()=>a.Jo,O4:()=>a.O4,Qc:()=>u,VG:()=>a.VG,Wh:()=>a.Wh,Wi:()=>a.Wi,pe:()=>a.pe,rp:()=>a.rp,uf:()=>a.uf,yx:()=>a.yx});var r=n(240236),i=n(853219),o=n(655697),a=n(823511);function s(t){t.forEach((function(t){if(delete t.location,(0,a.Wi)(t)||(0,a.Jo)(t))for(var e in t.options)delete t.options[e].location,s(t.options[e].value);else(0,a.uf)(t)&&(0,a.Wh)(t.style)||((0,a.rp)(t)||(0,a.pe)(t))&&(0,a.Ii)(t.style)?delete t.style.location:(0,a.HI)(t)&&s(t.children)}))}function u(t,e){void 0===e&&(e={}),e=(0,r.pi)({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new o._(t,e).parse();if(n.err){var a=SyntaxError(i.o[n.err.kind]);throw a.location=n.err.location,a.originalMessage=n.err.message,a}return(null==e?void 0:e.captureLocation)||s(n.val),n.val}o._},655697:(t,e,n)=>{"use strict";n.d(e,{_:()=>N});var r,i=n(240236),o=n(853219),a=n(823511),s=n(846500),u=n(473767),c=n(989558),l=n(264100),f=new RegExp("^".concat(s.p.source,"*")),h=new RegExp("".concat(s.p.source,"*$"));function d(t,e){return{start:t,end:e}}var p=!!String.prototype.startsWith&&"_a".startsWith("a",1),g=!!String.fromCodePoint,m=!!Object.fromEntries,y=!!String.prototype.codePointAt,v=!!String.prototype.trimStart,b=!!String.prototype.trimEnd,w=!!Number.isSafeInteger?Number.isSafeInteger:function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},E=!0;try{E="a"===(null===(r=C("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===r?void 0:r[0])}catch(M){E=!1}var T,x=p?function(t,e,n){return t.startsWith(e,n)}:function(t,e,n){return t.slice(n,n+e.length)===e},A=g?String.fromCodePoint:function(){for(var t=[],e=0;eo;){if((n=t[o++])>1114111)throw RangeError(n+" is not a valid code point");r+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return r},S=m?Object.fromEntries:function(t){for(var e={},n=0,r=t;n=n)){var r,i=t.charCodeAt(e);return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:r-56320+(i-55296<<10)+65536}},O=v?function(t){return t.trimStart()}:function(t){return t.replace(f,"")},R=b?function(t){return t.trimEnd()}:function(t){return t.replace(h,"")};function C(t,e){return new RegExp(t,e)}if(E){var k=C("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");T=function(t,e){var n;return k.lastIndex=e,null!==(n=k.exec(t)[1])&&void 0!==n?n:""}}else T=function(t,e){for(var n=[];;){var r=_(t,e);if(void 0===r||P(r)||L(r))break;n.push(r),e+=r>=65536?2:1}return A.apply(void 0,n)};var N=function(){function t(t,e){void 0===e&&(e={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!e.ignoreTag,this.locale=e.locale,this.requiresOtherClause=!!e.requiresOtherClause,this.shouldParseSkeletons=!!e.shouldParseSkeletons}return t.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(t,e,n){for(var r=[];!this.isEOF();){var i=this.char();if(123===i){if((s=this.parseArgument(t,n)).err)return s;r.push(s.val)}else{if(125===i&&t>0)break;if(35!==i||"plural"!==e&&"selectordinal"!==e){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(o.o.UNMATCHED_CLOSING_TAG,d(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&I(this.peek()||0)){if((s=this.parseTag(t,e)).err)return s;r.push(s.val)}else{var s;if((s=this.parseLiteral(t,e)).err)return s;r.push(s.val)}}else{var u=this.clonePosition();this.bump(),r.push({type:a.wD.pound,location:d(u,this.clonePosition())})}}}return{val:r,err:null}},t.prototype.parseTag=function(t,e){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:a.wD.literal,value:"<".concat(r,"/>"),location:d(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,e,!0);if(i.err)return i;var s=i.val,u=this.clonePosition();if(this.bumpIf("")?{val:{type:a.wD.tag,value:r,children:s,location:d(n,this.clonePosition())},err:null}:this.error(o.o.INVALID_TAG,d(u,this.clonePosition())))}return this.error(o.o.UNCLOSED_TAG,d(n,this.clonePosition()))}return this.error(o.o.INVALID_TAG,d(n,this.clonePosition()))},t.prototype.parseTagName=function(){var t,e=this.offset();for(this.bump();!this.isEOF()&&(45===(t=this.char())||46===t||t>=48&&t<=57||95===t||t>=97&&t<=122||t>=65&&t<=90||183==t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039);)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(t,e){for(var n=this.clonePosition(),r="";;){var i=this.tryParseQuote(e);if(i)r+=i;else{var o=this.tryParseUnquoted(t,e);if(o)r+=o;else{var s=this.tryParseLeftAngleBracket();if(!s)break;r+=s}}}var u=d(n,this.clonePosition());return{val:{type:a.wD.literal,value:r,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(I(t=this.peek()||0)||47===t)?null:(this.bump(),"<");var t},t.prototype.tryParseQuote=function(t){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===t||"selectordinal"===t)break;return null;default:return null}this.bump();var e=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}e.push(39),this.bump()}else e.push(n);this.bump()}return A.apply(void 0,e)},t.prototype.tryParseUnquoted=function(t,e){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===e||"selectordinal"===e)||125===n&&t>0?null:(this.bump(),A(n))},t.prototype.parseArgument=function(t,e){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,d(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(o.o.EMPTY_ARGUMENT,d(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(o.o.MALFORMED_ARGUMENT,d(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,d(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:a.wD.argument,value:r,location:d(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,d(n,this.clonePosition())):this.parseArgumentOptions(t,e,r,n);default:return this.error(o.o.MALFORMED_ARGUMENT,d(n,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),e=this.offset(),n=T(this.message,e),r=e+n.length;return this.bumpTo(r),{value:n,location:d(t,this.clonePosition())}},t.prototype.parseArgumentOptions=function(t,e,n,r){var s,c=this.clonePosition(),f=this.parseIdentifierIfPossible().value,h=this.clonePosition();switch(f){case"":return this.error(o.o.EXPECT_ARGUMENT_TYPE,d(c,h));case"number":case"date":case"time":this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var g=this.clonePosition();if((A=this.parseSimpleArgStyleIfPossible()).err)return A;if(0===(b=R(A.val)).length)return this.error(o.o.EXPECT_ARGUMENT_STYLE,d(this.clonePosition(),this.clonePosition()));p={style:b,styleLocation:d(g,this.clonePosition())}}if((_=this.tryParseArgumentClose(r)).err)return _;var m=d(r,this.clonePosition());if(p&&x(null==p?void 0:p.style,"::",0)){var y=O(p.style.slice(2));if("number"===f)return(A=this.parseNumberSkeletonFromString(y,p.styleLocation)).err?A:{val:{type:a.wD.number,value:n,location:m,style:A.val},err:null};if(0===y.length)return this.error(o.o.EXPECT_DATE_TIME_SKELETON,m);var v=y;this.locale&&(v=(0,l.T)(y,this.locale));var b={type:a.aV.dateTime,pattern:v,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?(0,u.T)(v):{}};return{val:{type:"date"===f?a.wD.date:a.wD.time,value:n,location:m,style:b},err:null}}return{val:{type:"number"===f?a.wD.number:"date"===f?a.wD.date:a.wD.time,value:n,location:m,style:null!==(s=null==p?void 0:p.style)&&void 0!==s?s:null},err:null};case"plural":case"selectordinal":case"select":var w=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(o.o.EXPECT_SELECT_ARGUMENT_OPTIONS,d(w,(0,i.pi)({},w)));this.bumpSpace();var E=this.parseIdentifierIfPossible(),T=0;if("select"!==f&&"offset"===E.value){if(!this.bumpIf(":"))return this.error(o.o.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,d(this.clonePosition(),this.clonePosition()));var A;if(this.bumpSpace(),(A=this.tryParseDecimalInteger(o.o.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,o.o.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return A;this.bumpSpace(),E=this.parseIdentifierIfPossible(),T=A.val}var _,C=this.tryParsePluralOrSelectOptions(t,f,e,E);if(C.err)return C;if((_=this.tryParseArgumentClose(r)).err)return _;var k=d(r,this.clonePosition());return"select"===f?{val:{type:a.wD.select,value:n,options:S(C.val),location:k},err:null}:{val:{type:a.wD.plural,value:n,options:S(C.val),offset:T,pluralType:"plural"===f?"cardinal":"ordinal",location:k},err:null};default:return this.error(o.o.INVALID_ARGUMENT_TYPE,d(c,h))}},t.prototype.tryParseArgumentClose=function(t){return this.isEOF()||125!==this.char()?this.error(o.o.EXPECT_ARGUMENT_CLOSING_BRACE,d(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,e=this.clonePosition();!this.isEOF();){switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(o.o.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,d(n,this.clonePosition()));this.bump();break;case 123:t+=1,this.bump();break;case 125:if(!(t>0))return{val:this.message.slice(e.offset,this.offset()),err:null};t-=1;break;default:this.bump()}}return{val:this.message.slice(e.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(t,e){var n=[];try{n=(0,c.O)(t)}catch(r){return this.error(o.o.INVALID_NUMBER_SKELETON,e)}return{val:{type:a.aV.number,tokens:n,location:e,parsedOptions:this.shouldParseSkeletons?(0,c.I)(n):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(t,e,n,r){for(var i,a=!1,s=[],u=new Set,c=r.value,l=r.location;;){if(0===c.length){var f=this.clonePosition();if("select"===e||!this.bumpIf("="))break;var h=this.tryParseDecimalInteger(o.o.EXPECT_PLURAL_ARGUMENT_SELECTOR,o.o.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;l=d(f,this.clonePosition()),c=this.message.slice(f.offset,this.offset())}if(u.has(c))return this.error("select"===e?o.o.DUPLICATE_SELECT_ARGUMENT_SELECTOR:o.o.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);"other"===c&&(a=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===e?o.o.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:o.o.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,d(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,e,n);if(g.err)return g;var m=this.tryParseArgumentClose(p);if(m.err)return m;s.push([c,{value:g.val,location:d(p,this.clonePosition())}]),u.add(c),this.bumpSpace(),c=(i=this.parseIdentifierIfPossible()).value,l=i.location}return 0===s.length?this.error("select"===e?o.o.EXPECT_SELECT_ARGUMENT_SELECTOR:o.o.EXPECT_PLURAL_ARGUMENT_SELECTOR,d(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(o.o.MISSING_OTHER_CLAUSE,d(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(t,e){var n=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,o=0;!this.isEOF();){var a=this.char();if(!(a>=48&&a<=57))break;i=!0,o=10*o+(a-48),this.bump()}var s=d(r,this.clonePosition());return i?w(o*=n)?{val:o,err:null}:this.error(e,s):this.error(t,s)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var e=_(this.message,t);if(void 0===e)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return e},t.prototype.error=function(t,e){return{val:null,err:{kind:t,message:this.message,location:e}}},t.prototype.bump=function(){if(!this.isEOF()){var t=this.char();10===t?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},t.prototype.bumpIf=function(t){if(x(this.message,t,this.offset())){for(var e=0;e=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var e=this.offset();if(e===t)break;if(e>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&P(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),e=this.offset(),n=this.message.charCodeAt(e+(t>=65536?2:1));return null!=n?n:null},t}();function I(t){return t>=97&&t<=122||t>=65&&t<=90}function P(t){return t>=9&&t<=13||32===t||133===t||t>=8206&&t<=8207||8232===t||8233===t}function L(t){return t>=33&&t<=35||36===t||t>=37&&t<=39||40===t||41===t||42===t||43===t||44===t||45===t||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||91===t||92===t||93===t||94===t||96===t||123===t||124===t||125===t||126===t||161===t||t>=162&&t<=165||166===t||167===t||169===t||171===t||172===t||174===t||176===t||177===t||182===t||187===t||191===t||215===t||247===t||t>=8208&&t<=8213||t>=8214&&t<=8215||8216===t||8217===t||8218===t||t>=8219&&t<=8220||8221===t||8222===t||8223===t||t>=8224&&t<=8231||t>=8240&&t<=8248||8249===t||8250===t||t>=8251&&t<=8254||t>=8257&&t<=8259||8260===t||8261===t||8262===t||t>=8263&&t<=8273||8274===t||8275===t||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||8608===t||t>=8609&&t<=8610||8611===t||t>=8612&&t<=8613||8614===t||t>=8615&&t<=8621||8622===t||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||8658===t||8659===t||8660===t||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||8968===t||8969===t||8970===t||8971===t||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||9001===t||9002===t||t>=9003&&t<=9083||9084===t||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||9655===t||t>=9656&&t<=9664||9665===t||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||9839===t||t>=9840&&t<=10087||10088===t||10089===t||10090===t||10091===t||10092===t||10093===t||10094===t||10095===t||10096===t||10097===t||10098===t||10099===t||10100===t||10101===t||t>=10132&&t<=10175||t>=10176&&t<=10180||10181===t||10182===t||t>=10183&&t<=10213||10214===t||10215===t||10216===t||10217===t||10218===t||10219===t||10220===t||10221===t||10222===t||10223===t||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||10627===t||10628===t||10629===t||10630===t||10631===t||10632===t||10633===t||10634===t||10635===t||10636===t||10637===t||10638===t||10639===t||10640===t||10641===t||10642===t||10643===t||10644===t||10645===t||10646===t||10647===t||10648===t||t>=10649&&t<=10711||10712===t||10713===t||10714===t||10715===t||t>=10716&&t<=10747||10748===t||10749===t||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||11158===t||t>=11159&&t<=11263||t>=11776&&t<=11777||11778===t||11779===t||11780===t||11781===t||t>=11782&&t<=11784||11785===t||11786===t||11787===t||11788===t||11789===t||t>=11790&&t<=11798||11799===t||t>=11800&&t<=11801||11802===t||11803===t||11804===t||11805===t||t>=11806&&t<=11807||11808===t||11809===t||11810===t||11811===t||11812===t||11813===t||11814===t||11815===t||11816===t||11817===t||t>=11818&&t<=11822||11823===t||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||11840===t||11841===t||11842===t||t>=11843&&t<=11855||t>=11856&&t<=11857||11858===t||t>=11859&&t<=11903||t>=12289&&t<=12291||12296===t||12297===t||12298===t||12299===t||12300===t||12301===t||12302===t||12303===t||12304===t||12305===t||t>=12306&&t<=12307||12308===t||12309===t||12310===t||12311===t||12312===t||12313===t||12314===t||12315===t||12316===t||12317===t||t>=12318&&t<=12319||12320===t||12336===t||64830===t||64831===t||t>=65093&&t<=65094}},846500:(t,e,n)=>{"use strict";n.d(e,{p:()=>r});var r=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/},216386:(t,e,n)=>{"use strict";n.d(e,{_:()=>r});var r={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]}},823511:(t,e,n)=>{"use strict";var r,i;function o(t){return t.type===r.literal}function a(t){return t.type===r.argument}function s(t){return t.type===r.number}function u(t){return t.type===r.date}function c(t){return t.type===r.time}function l(t){return t.type===r.select}function f(t){return t.type===r.plural}function h(t){return t.type===r.pound}function d(t){return t.type===r.tag}function p(t){return!(!t||"object"!=typeof t||t.type!==i.number)}function g(t){return!(!t||"object"!=typeof t||t.type!==i.dateTime)}n.d(e,{HI:()=>d,Ii:()=>g,Jo:()=>f,O4:()=>o,VG:()=>a,Wh:()=>p,Wi:()=>l,aV:()=>i,pe:()=>c,rp:()=>u,uf:()=>s,wD:()=>r,yx:()=>h}),function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"}(r||(r={})),function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"}(i||(i={}))},473767:(t,e,n)=>{"use strict";n.d(e,{T:()=>i});var r=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function i(t){var e={};return t.replace(r,(function(t){var n=t.length;switch(t[0]){case"G":e.era=4===n?"long":5===n?"narrow":"short";break;case"y":e.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][n-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][n-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][n-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][n-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][n-1];break;case"s":e.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),e}},989558:(t,e,n)=>{"use strict";n.d(e,{I:()=>p,O:()=>o});var r=n(240236),i=n(234105);function o(t){if(0===t.length)throw new Error("Number skeleton cannot be empty");for(var e=[],n=0,r=t.split(i.r).filter((function(t){return t.length>0}));n1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(u,(function(t,n,r,i,o,a){if(n)e.minimumIntegerDigits=r.length;else{if(i&&o)throw new Error("We currently do not support maximum integer digits");if(a)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(c.test(o.stem))e.minimumIntegerDigits=o.stem.length;else if(a.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(a,(function(t,n,r,i,o,a){return"*"===r?e.minimumFractionDigits=n.length:i&&"#"===i[0]?e.maximumFractionDigits=i.length:o&&a?(e.minimumFractionDigits=o.length,e.maximumFractionDigits=o.length+a.length):(e.minimumFractionDigits=n.length,e.maximumFractionDigits=n.length),""}));var p=o.options[0];"w"===p?e=(0,r.pi)((0,r.pi)({},e),{trailingZeroDisplay:"stripIfInteger"}):p&&(e=(0,r.pi)((0,r.pi)({},e),l(p)))}else if(s.test(o.stem))e=(0,r.pi)((0,r.pi)({},e),l(o.stem));else{var g=f(o.stem);g&&(e=(0,r.pi)((0,r.pi)({},e),g));var m=h(o.stem);m&&(e=(0,r.pi)((0,r.pi)({},e),m))}}return e}},234105:(t,e,n)=>{"use strict";n.d(e,{r:()=>r});var r=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i},358579:(t,e)=>{"use strict";e.Z=function(){for(var t=[],e=0;e{"use strict";n.d(e,{Z:()=>i});var r=n(512910);function i(t,e){t.classList?t.classList.add(e):(0,r.Z)(t,e)||("string"==typeof t.className?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}},512910:(t,e,n)=>{"use strict";function r(t,e){return t.classList?!!e&&t.classList.contains(e):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")}n.d(e,{Z:()=>r})},139741:(t,e,n)=>{"use strict";function r(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function i(t,e){t.classList?t.classList.remove(e):"string"==typeof t.className?t.className=r(t.className,e):t.setAttribute("class",r(t.className&&t.className.baseVal||"",e))}n.d(e,{Z:()=>i})},172931:(t,e,n)=>{"use strict";n.d(e,{lX:()=>y});var r=n(110519),i=n(473124),o=(n(83780),n(196750));function a(t){return"/"===t.charAt(0)?t:"/"+t}function s(t,e){return function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)}(t,e)?t.substr(e.length):t}function u(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function c(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function l(t,e,n,o){var a;"string"==typeof t?(a=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t),a.state=e):(void 0===(a=(0,r.Z)({},t)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==e&&void 0===a.state&&(a.state=e));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,i.Z)(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function f(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r{"use strict";n.d(e,{ZP:()=>r});const r=n(33976).C},33976:(t,e,n)=>{"use strict";n.d(e,{C:()=>c});var r=n(240236),i=n(363014),o=n(23278),a=n(15810);function s(t,e){return e?Object.keys(t).reduce((function(n,i){var o,a;return n[i]=(o=t[i],(a=e[i])?(0,r.pi)((0,r.pi)((0,r.pi)({},o||{}),a||{}),Object.keys(o).reduce((function(t,e){return t[e]=(0,r.pi)((0,r.pi)({},o[e]),a[e]||{}),t}),{})):o),n}),(0,r.pi)({},t)):t}function u(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}var c=function(){function t(e,n,i,c){var l,f=this;if(void 0===n&&(n=t.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(t){var e=f.formatToParts(t);if(1===e.length)return e[0].value;var n=e.reduce((function(t,e){return t.length&&e.type===a.du.literal&&"string"==typeof t[t.length-1]?t[t.length-1]+=e.value:t.push(e.value),t}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(t){return(0,a.FK)(f.ast,f.locales,f.formatters,f.formats,t,void 0,f.message)},this.resolvedOptions=function(){var t;return{locale:(null===(t=f.resolvedLocale)||void 0===t?void 0:t.toString())||Intl.NumberFormat.supportedLocalesOf(f.locales)[0]}},this.getAst=function(){return f.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),"string"==typeof e){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var h=c||{},d=(h.formatters,(0,r._T)(h,["formatters"]));this.ast=t.__parse(e,(0,r.pi)((0,r.pi)({},d),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=s(t.formats,i),this.formatters=c&&c.formatters||(void 0===(l=this.formatterCache)&&(l={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:(0,o.H)((function(){for(var t,e=[],n=0;n0?new Intl.Locale(e[0]):new Intl.Locale("string"==typeof t?t:t[0])}},t.__parse=i.Qc,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}()},953836:(t,e,n)=>{"use strict";n.d(e,{C8:()=>a,HR:()=>u,YR:()=>s,jK:()=>r,u_:()=>o});var r,i=n(240236);!function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"}(r||(r={}));var o=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.code=n,i.originalMessage=r,i}return(0,i.ZT)(e,t),e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),a=function(t){function e(e,n,i,o){return t.call(this,'Invalid values for "'.concat(e,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),r.INVALID_VALUE,o)||this}return(0,i.ZT)(e,t),e}(o),s=function(t){function e(e,n,i){return t.call(this,'Value for "'.concat(e,'" must be of type ').concat(n),r.INVALID_VALUE,i)||this}return(0,i.ZT)(e,t),e}(o),u=function(t){function e(e,n){return t.call(this,'The intl string context variable "'.concat(e,'" was not provided to the string "').concat(n,'"'),r.MISSING_VALUE,n)||this}return(0,i.ZT)(e,t),e}(o)},15810:(t,e,n)=>{"use strict";n.d(e,{FK:()=>s,du:()=>r});var r,i=n(363014),o=n(953836);function a(t){return"function"==typeof t}function s(t,e,n,u,c,l,f){if(1===t.length&&(0,i.O4)(t[0]))return[{type:r.literal,value:t[0].value}];for(var h=[],d=0,p=t;d{"use strict";t.exports=t=>!(!t||t.length<3)&&(255===t[0]&&216===t[1]&&255===t[2])},385417:t=>{"use strict";t.exports=function(t){return!(!t||t.length<8)&&(137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7])}},649799:(t,e,n)=>{"use strict";n.d(e,{$g:()=>b,K5:()=>g,Om:()=>N,YN:()=>T,hA:()=>u,kq:()=>A,p4:()=>h,zO:()=>E});var r=n(42782),i=function(){};function o(t,e){void 0===e&&(e="Illegal state"),t||function(t){throw new Error("[mobx-utils] "+t)}(e)}var a=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(a(Object.getPrototypeOf(t))||[])},s=function(t){return function(t){var e=a(t);return e.filter((function(t,n){return e.indexOf(t)===n}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))},u="pending",c="fulfilled",l="rejected";function f(t){switch(this.state){case u:return t.pending&&t.pending(this.value);case l:return t.rejected&&t.rejected(this.value);case c:return t.fulfilled?t.fulfilled(this.value):this.value}}function h(t,e){if(o(arguments.length<=2,"fromPromise expects up to two arguments"),o("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var n=t;t.then((0,r.aD)("observableFromPromise-resolve",(function(t){n.value=t,n.state=c})),(0,r.aD)("observableFromPromise-reject",(function(t){n.value=t,n.state=l}))),n.isPromiseBasedObservable=!0,n.case=f;var i=!e||e.state!==c&&e.state!==u?void 0:e.value;return(0,r.dw)(n,{value:i,state:u},{},{deep:!1}),n}!function(t){t.reject=(0,r.aD)("fromPromise.reject",(function(e){var n=t(Promise.reject(e));return n.state=l,n.value=e,n})),t.resolve=(0,r.aD)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var n=t(Promise.resolve(e));return n.state=c,n.value=e,n}))}(h||(h={}));function d(t,e,n){void 0===e&&(e=i),void 0===n&&(n=void 0);var a=!1,s=!1,u=n,c=function(){a&&(a=!1,e())},l=(0,r.cp)("ResourceBasedObservable",(function(){o(!a&&!s),a=!0,t((function(t){(0,r.$$)(!0,(function(){u=t,l.reportChanged()}))}))}),c);return{current:function(){return o(!s,"subscribingObservable has already been disposed"),l.reportObserved()||a||console.warn("Called `get` of a subscribingObservable outside a reaction. Current value will be returned but no new subscription has started"),u},dispose:function(){s=!0,c()},isAlive:function(){return a}}}var p=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a};function g(t,e){var n;void 0===e&&(e=!1);var i=(0,r.Fl)(t);return(n={subscribe:function(t){return"function"==typeof t?{unsubscribe:(0,r.N7)(i,(function(e){var n=e.newValue;return t(n)}),e)}:t&&"object"==typeof t&&t.next?{unsubscribe:(0,r.N7)(i,(function(e){var n=e.newValue;return t.next(n)}),e)}:{unsubscribe:function(){}}}})["function"==typeof Symbol&&Symbol.observable||"@@observable"]=function(){return this},n}!function(){function t(t,e){var n=this;Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"subscription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),(0,r.rC)(this),(0,r.z)((function(){n.current=e,n.subscription=t.subscribe(n)}))}Object.defineProperty(t.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.subscription&&this.subscription.unsubscribe()}}),Object.defineProperty(t.prototype,"next",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t}}),Object.defineProperty(t.prototype,"complete",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.dispose()}}),Object.defineProperty(t.prototype,"error",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.current=t,this.dispose()}}),p([r.LO.ref],t.prototype,"current",void 0),p([r.aD.bound],t.prototype,"next",null),p([r.aD.bound],t.prototype,"complete",null),p([r.aD.bound],t.prototype,"error",null)}();var m=function(){return m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},v=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;Object.defineProperty(this,"model",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"localValues",{enumerable:!0,configurable:!0,writable:!0,value:r.LO.map({})}),Object.defineProperty(this,"localComputedValues",{enumerable:!0,configurable:!0,writable:!0,value:r.LO.map({})}),Object.defineProperty(this,"isPropertyDirty",{enumerable:!0,configurable:!0,writable:!0,value:function(t){return e.localValues.has(t)}}),(0,r.rC)(this),o((0,r.Pb)(t),"createViewModel expects an observable object");var n=s(this);s(t).forEach((function(i){var a;if(!n.includes(i)&&i!==r.so&&"__mobxDidRunLazyInitializers"!==i){if(o(-1===v.indexOf(i),"The propertyname "+i+" is reserved and cannot be used with viewModels"),(0,r.eJ)(t,i)){var s=(0,r.kS)(t,i),u=s.derivation.bind(e),c=null===(a=s.setter_)||void 0===a?void 0:a.bind(e);e.localComputedValues.set(i,(0,r.Fl)(u,{set:c}))}var l=Object.getOwnPropertyDescriptor(t,i),f=l?{enumerable:l.enumerable}:{};Object.defineProperty(e,i,m(m({},f),{configurable:!0,get:function(){return(0,r.eJ)(t,i)?e.localComputedValues.get(i).get():e.isPropertyDirty(i)?e.localValues.get(i):e.model[i]},set:(0,r.aD)((function(n){(0,r.eJ)(t,i)?e.localComputedValues.get(i).set(n):n!==e.model[i]?e.localValues.set(i,n):e.localValues.delete(i)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return new Map(this.localValues)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"submit",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;(0,r.XP)(this.localValues).forEach((function(e){var n=t.localValues.get(e),i=t.model[e];(0,r.Ei)(i)?i.replace(n):(0,r.LJ)(i)?(i.clear(),i.merge(n)):(0,r.M5)(n)||(t.model[e]=n)})),this.localValues.clear()}}),Object.defineProperty(t.prototype,"reset",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.localValues.clear()}}),Object.defineProperty(t.prototype,"resetProperty",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.localValues.delete(t)}}),y([r.Fl],t.prototype,"isDirty",null),y([r.Fl],t.prototype,"changedValues",null),y([r.aD.bound],t.prototype,"submit",null),y([r.aD.bound],t.prototype,"reset",null),y([r.aD.bound],t.prototype,"resetProperty",null)}();function b(t,e){var n=(0,r.qp)(t,e);if(!n)throw new Error("No computed provided, please provide an object created with `computed(() => expr)` or an object + property name");return(0,r.N7)(n,(function(){}))}var w={};function E(t){return void 0===t&&(t=1e3),(0,r.SW)()?(w[t]||(w[t]="number"==typeof t?function(t){var e;return d((function(n){n(Date.now()),e=setInterval((function(){return n(Date.now())}),t)}),(function(){clearInterval(e)}),Date.now())}(t):e=d((function(t){function n(){window.requestAnimationFrame((function(){t(Date.now()),e.isAlive()&&n()}))}t(Date.now()),n()}),(function(){}),Date.now())),w[t].current()):Date.now();var e}function T(t){return(0,r.SW)()||console.warn("'expr' should only be used inside other reactive functions."),(0,r.Fl)(t).get()}var x=function(){return x=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t-1&&this.closest.has(this.args[t-1])}}),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertNotDisposed();for(var e=this.args.length,n=this.closest,r=this.closestIdx;r0;r--)0===n[r].size&&n[r-1].delete(this.args[r-1]);this.isDisposed=!0}}),Object.defineProperty(t.prototype,"assertNotDisposed",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.isDisposed)throw new Error("Concurrent modification exception")}}),t}()),R=function(){function t(){Object.defineProperty(this,"store",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"argsLength",{enumerable:!0,configurable:!0,writable:!0,value:-1}),Object.defineProperty(this,"last",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(t.prototype,"entry",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new O(this.store,t)}}),t}(),C=function(){return C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{"use strict";n.d(e,{E1:()=>o,Tl:()=>a,Zy:()=>s});var r,i=!("undefined"==typeof window||!window.document||!window.document.createElement);function o(){if(r)return r;if(!i||!window.document.body)return"indeterminate";var t=window.document.createElement("div");return t.appendChild(document.createTextNode("ABCD")),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),r="reverse",t.scrollLeft>0?r="default":(t.scrollLeft=2,t.scrollLeft<2&&(r="negative")),document.body.removeChild(t),r}function a(t,e){var n=t.scrollLeft;if("rtl"!==e)return n;var r=o();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return t.scrollWidth-t.clientWidth+n;case"reverse":return t.scrollWidth-t.clientWidth-n}return n}function s(t,e,n){if("rtl"===n){var r=o();if("indeterminate"!==r)switch(r){case"negative":t.scrollLeft=t.clientWidth-t.scrollWidth+e;break;case"reverse":t.scrollLeft=t.scrollWidth-t.clientWidth-e;break;default:t.scrollLeft=e}}else t.scrollLeft=e}},543501:(t,e,n)=>{"use strict";var r=n(338660);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},514993:(t,e,n)=>{t.exports=n(543501)()},338660:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},984956:(t,e,n)=>{"use strict";n.d(e,{Z:()=>g,x:()=>d});var r=n(110519),i=n(122293),o=n(982721),a=n(875604),s=n(514993),u=n.n(s),c=n(361443),l=["client","offset","scroll","bounds","margin"];function f(t){var e=[];return l.forEach((function(n){t[n]&&e.push(n)})),e}function h(t,e){var n={};if(e.indexOf("client")>-1&&(n.client={top:t.clientTop,left:t.clientLeft,width:t.clientWidth,height:t.clientHeight}),e.indexOf("offset")>-1&&(n.offset={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}),e.indexOf("scroll")>-1&&(n.scroll={top:t.scrollTop,left:t.scrollLeft,width:t.scrollWidth,height:t.scrollHeight}),e.indexOf("bounds")>-1){var r=t.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(e.indexOf("margin")>-1){var i=getComputedStyle(t);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function d(t){return function(e){var n,s;return s=n=function(n){function s(){for(var e,r=arguments.length,i=new Array(r),o=0;o{"use strict";n.d(e,{Z:()=>h});var r=n(110519),i=n(122293),o=n(982721),a=n(741635),s=n(139741),u=n(875604),c=n(92009),l=function(t,e){return t&&e&&e.split(" ").forEach((function(e){return(0,s.Z)(t,e)}))},f=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i{"use strict";n.d(e,{$r:()=>c,Ix:()=>d,Wj:()=>l,ZP:()=>m,cn:()=>h,d0:()=>f});var r=n(122293),i=n(982721),o=n(875604),a=n(204358),s=n(237811),u=n(469939),c="unmounted",l="exited",f="entering",h="entered",d="exiting",p=function(t){function e(e,n){var r;r=t.call(this,e,n)||this;var i,o=n&&!n.isMounting?e.enter:e.appear;return r.appearStatus=null,e.in?o?(i=l,r.appearStatus=f):i=h:i=e.unmountOnExit||e.mountOnEnter?c:l,r.state={status:i},r.nextCallback=null,r}(0,i.Z)(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===c?{status:l}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(t){var e=null;if(t!==this.props){var n=this.state.status;this.props.in?n!==f&&n!==h&&(e=f):n!==f&&n!==h||(e=d)}this.updateStatus(!1,e)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var t,e,n,r=this.props.timeout;return t=e=n=r,null!=r&&"number"!=typeof r&&(t=r.exit,e=r.enter,n=void 0!==r.appear?r.appear:e),{exit:t,enter:e,appear:n}},n.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),e===f?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&this.state.status===l&&this.setState({status:c})},n.performEnter=function(t){var e=this,n=this.props.enter,r=this.context?this.context.isMounting:t,i=this.props.nodeRef?[r]:[a.findDOMNode(this),r],o=i[0],u=i[1],c=this.getTimeouts(),l=r?c.appear:c.enter;!t&&!n||s.Z.disabled?this.safeSetState({status:h},(function(){e.props.onEntered(o)})):(this.props.onEnter(o,u),this.safeSetState({status:f},(function(){e.props.onEntering(o,u),e.onTransitionEnd(l,(function(){e.safeSetState({status:h},(function(){e.props.onEntered(o,u)}))}))})))},n.performExit=function(){var t=this,e=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:a.findDOMNode(this);e&&!s.Z.disabled?(this.props.onExit(r),this.safeSetState({status:d},(function(){t.props.onExiting(r),t.onTransitionEnd(n.exit,(function(){t.safeSetState({status:l},(function(){t.props.onExited(r)}))}))}))):this.safeSetState({status:l},(function(){t.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},n.setNextCallback=function(t){var e=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,e.nextCallback=null,t(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(t,e){this.setNextCallback(e);var n=this.props.nodeRef?this.props.nodeRef.current:a.findDOMNode(this),r=null==t&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],s=i[1];this.props.addEndListener(o,s)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},n.render=function(){var t=this.state.status;if(t===c)return null;var e=this.props,n=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,(0,r.Z)(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(u.Z.Provider,{value:null},"function"==typeof n?n(t,i):o.cloneElement(o.Children.only(n),i))},e}(o.Component);function g(){}p.contextType=u.Z,p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:g,onEntering:g,onEntered:g,onExit:g,onExiting:g,onExited:g},p.UNMOUNTED=c,p.EXITED=l,p.ENTERING=f,p.ENTERED=h,p.EXITING=d;const m=p},262817:(t,e,n)=>{"use strict";n.d(e,{Z:()=>h});var r=n(122293),i=n(110519),o=n(302699),a=n(982721),s=n(875604),u=n(469939),c=n(585895),l=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},f=function(t){function e(e,n){var r,i=(r=t.call(this,e,n)||this).handleExited.bind((0,o.Z)(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}(0,a.Z)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(t,e){var n=e.children,r=e.handleExited;return{children:e.firstRender?(0,c.Kg)(t,r):(0,c.Rp)(t,n,r),firstRender:!1}},n.handleExited=function(t,e){var n=(0,c.n)(this.props.children);t.key in n||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var n=(0,i.Z)({},e.children);return delete n[t.key],{children:n}})))},n.render=function(){var t=this.props,e=t.component,n=t.childFactory,i=(0,r.Z)(t,["component","childFactory"]),o=this.state.contextValue,a=l(this.state.children).map(n);return delete i.appear,delete i.enter,delete i.exit,null===e?s.createElement(u.Z.Provider,{value:o},a):s.createElement(u.Z.Provider,{value:o},s.createElement(e,i,a))},e}(s.Component);f.propTypes={},f.defaultProps={component:"div",childFactory:function(t){return t}};const h=f},469939:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=n(875604).createContext(null)},237811:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r={disabled:!1}},585895:(t,e,n)=>{"use strict";n.d(e,{Kg:()=>a,Rp:()=>s,n:()=>i});var r=n(875604);function i(t,e){var n=Object.create(null);return t&&r.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&(0,r.isValidElement)(t)?e(t):t}(t)})),n}function o(t,e,n){return null!=n[e]?n[e]:t.props[e]}function a(t,e){return i(t.children,(function(n){return(0,r.cloneElement)(n,{onExited:e.bind(null,n),in:!0,appear:o(n,"appear",t),enter:o(n,"enter",t),exit:o(n,"exit",t)})}))}function s(t,e,n){var a=i(t.children),s=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,i=Object.create(null),o=[];for(var a in t)a in e?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var u in e){if(i[u])for(r=0;r{"use strict";n.d(e,{Z:()=>A});var r=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var n=0,r=Object.keys(e);n0},t}(),T="undefined"!=typeof WeakMap?new WeakMap:new r,x=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new E(e,n,this);T.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){x.prototype[t]=function(){var e;return(e=T.get(this))[t].apply(e,arguments)}}));const A=void 0!==o.ResizeObserver?o.ResizeObserver:x},473124:(t,e,n)=>{"use strict";function r(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,i=t.length;ro});const o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],a=t&&r(t),s=e&&r(e),u=a||s;if(t&&r(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var l=o[o.length-1];c="."===l||".."===l||""===l}else c=!1;for(var f=0,h=o.length;h>=0;h--){var d=o[h];"."===d?i(o,h):".."===d?(i(o,h),f++):f&&(i(o,h),f--)}if(!u)for(;f--;f)o.unshift("..");!u||""===o[0]||o[0]&&r(o[0])||o.unshift("");var p=o.join("/");return c&&"/"!==p.substr(-1)&&(p+="/"),p}},733381:(t,e,n)=>{"use strict";n.d(e,{d:()=>i});var r=n(593787),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(881458).L)},487530:(t,e,n)=>{"use strict";n.d(e,{y:()=>u});var r=n(579956),i=n(864955),o=n(137877),a=n(800336),s=n(536600),u=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,o=(0,i.Y)(t,e,n);if(r?r.call(o,this.source):o.add(this.source||s.v.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),s.v.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){s.v.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,r._)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=c(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(n){r(n),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[o.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e{"use strict";n.d(e,{c:()=>o});var r=n(536600),i=n(384496),o={closed:!0,next:function(t){},error:function(t){if(r.v.useDeprecatedSynchronousErrorHandling)throw t;(0,i.z)(t)},complete:function(){}}},895804:(t,e,n)=>{"use strict";n.d(e,{L:()=>i});var r=n(593787),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(881458).L)},958766:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},17986:(t,e,n)=>{"use strict";n.d(e,{Yc:()=>l,xQ:()=>f});var r=n(593787),i=n(487530),o=n(881458),a=n(660934),s=n(846196),u=n(165165),c=n(480851),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.ZT(e,t),e}(o.L),f=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.ZT(e,t),e.prototype[c.b]=function(){return new l(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new s.N;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i{"use strict";n.d(e,{W:()=>i});var r=n(593787),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.ZT(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(660934).w)},881458:(t,e,n)=>{"use strict";n.d(e,{L:()=>l});var r=n(593787),i=n(534721),o=n(483541),a=n(660934),s=n(480851),u=n(536600),c=n(384496),l=function(t){function e(n,r,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,a._parentSubscription=null,arguments.length){case 0:a.destination=o.c;break;case 1:if(!n){a.destination=o.c;break}if("object"==typeof n){n instanceof e?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,n,r,i)}return a}return r.ZT(e,t),e.prototype[s.b]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this._parentSubscription=null,this},e}(a.w),f=function(t){function e(e,n,r,a){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return(0,i.m)(n)?s=n:n&&(s=n.next,r=n.error,a=n.complete,n!==o.c&&(c=Object.create(n),(0,i.m)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=r,u._complete=a,u}return r.ZT(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,c.z)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,c.z)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};u.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),u.v.useDeprecatedSynchronousErrorHandling)throw n;(0,c.z)(n)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return u.v.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):((0,c.z)(r),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},660934:(t,e,n)=>{"use strict";n.d(e,{w:()=>c});var r=n(806242),i=n(423595),o=n(534721),a=n(471585),s=n(770557),u=n(542354),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this,c=n._parent,f=n._parents,h=n._unsubscribe,d=n._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var p=-1,g=f?f.length:0;c;)c.remove(this),c=++p{"use strict";n.d(e,{v:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},91776:(t,e,n)=>{"use strict";n.d(e,{N:()=>l});var r=n(593787),i=n(17986),o=n(487530),a=n(881458),s=n(660934),u=n(605032),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.ZT(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.w).add(this.source.subscribe(new f(this.getSubject(),this))),t.closed?(this._connection=null,t=s.w.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return(0,u.x)()(this)},e}(o.y).prototype,l={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:c._subscribe},_isComplete:{value:c._isComplete,writable:!0},getSubject:{value:c.getSubject},connect:{value:c.connect},refCount:{value:c.refCount}},f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.Yc);a.L},332098:(t,e,n)=>{"use strict";n.d(e,{E_:()=>i,cS:()=>o});var r=n(487530),i=new r.y((function(t){return t.complete()}));function o(t){return t?function(t){return new r.y((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},423713:(t,e,n)=>{"use strict";n.d(e,{D:()=>d});var r=n(487530),i=n(656159),o=n(741976),a=n(37159),s=n(356821),u=n(233771),c=n(343610),l=n(533083),f=n(671817),h=n(80506);function d(t,e){if(!e)return t instanceof r.y?t:new r.y((0,h.s)(t));if(null!=t){if((0,a.c)(t))return(0,f.u)(t,e);if((0,i.t)(t))return(0,c.p)(t,e);if((0,o.z)(t))return(0,u.n)(t,e);if((0,s.T)(t)||"string"==typeof t)return(0,l.E)(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},233771:(t,e,n)=>{"use strict";n.d(e,{n:()=>a});var r=n(487530),i=n(660934),o=n(152005);function a(t,e){return e?new r.y((function(n){var r=new i.w,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r})):new r.y((0,o.V)(t))}},467989:(t,e,n)=>{"use strict";n.d(e,{R:()=>s});var r=n(487530),i=n(806242),o=n(534721),a=n(858800);Object.prototype.toString;function s(t,e,n,c){return(0,o.m)(n)&&(c=n,n=void 0),c?s(t,e,n).pipe((0,a.U)((function(t){return(0,i.k)(t)?c.apply(void 0,t):c(t)}))):new r.y((function(r){u(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function u(t,e,n,r,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var a=t;t.addEventListener(e,n,i),o=function(){return a.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var s=t;t.on(e,n),o=function(){return s.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var c=t;t.addListener(e,n),o=function(){return c.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var l=0,f=t.length;l{"use strict";n.d(e,{E:()=>s});var r=n(487530),i=n(660934),o=n(991441),a=n(269284);function s(t,e){if(!t)throw new Error("Iterable cannot be null");return e?new r.y((function(n){var r,a=new i.w;return a.add((function(){r&&"function"==typeof r.return&&r.return()})),a.add(e.schedule((function(){r=t[o.hZ](),a.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(o){return void n.error(o)}e?n.complete():(n.next(t),this.schedule())}})))}))),a})):new r.y((0,a.u)(t))}},671817:(t,e,n)=>{"use strict";n.d(e,{u:()=>s});var r=n(487530),i=n(660934),o=n(137877),a=n(915024);function s(t,e){return e?new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){var i=t[o.L]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r})):new r.y((0,a.h)(t))}},343610:(t,e,n)=>{"use strict";n.d(e,{p:()=>a});var r=n(487530),i=n(660934),o=n(635378);function a(t,e){return e?new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r})):new r.y((0,o.A)(t))}},21103:(t,e,n)=>{"use strict";n.d(e,{T:()=>s});var r=n(487530),i=n(785789),o=n(444531),a=n(233771);function s(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.y?t[0]:(0,o.J)(n)((0,a.n)(t,s))}},127414:(t,e,n)=>{"use strict";n.d(e,{C:()=>o});var r=n(487530),i=n(900832),o=new r.y(i.Z)},980600:(t,e,n)=>{"use strict";n.d(e,{of:()=>s});var r=n(785789),i=n(233771),o=n(332098),a=n(829578);function s(){for(var t=[],e=0;e{"use strict";n.d(e,{i:()=>i});var r=n(487530);function i(t){var e=new r.y((function(e){e.next(t),e.complete()}));return e._isScalar=!0,e.value=t,e}},143206:(t,e,n)=>{"use strict";n.d(e,{b:()=>a});var r=n(593787),i=n(881458),o=n(934276);function a(t,e){return void 0===e&&(e=o.P),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.dueTime,this.scheduler))},t}(),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.ZT(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(i.L);function c(t){t.debouncedNext()}},953116:(t,e,n)=>{"use strict";n.d(e,{x:()=>s});var r=n(593787),i=n(881458),o=n(471585),a=n(770557);function s(t,e){return function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.compare,this.keySelector))},t}(),c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.ZT(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=(0,o.Y)(this.keySelector)(t))===a.T)return this.destination.error(a.T.e);var n=!1;if(this.hasKey){if((n=(0,o.Y)(this.compare)(this.key,e))===a.T)return this.destination.error(a.T.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(i.L)},223897:(t,e,n)=>{"use strict";n.d(e,{h:()=>o});var r=n(593787),i=n(881458);function o(t,e){return function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)},e}(i.L)},30240:(t,e,n)=>{"use strict";n.d(e,{x:()=>a});var r=n(593787),i=n(881458),o=n(660934);function a(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.callback))},t}(),u=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new o.w(n)),r}return r.ZT(e,t),e}(i.L)},858800:(t,e,n)=>{"use strict";n.d(e,{U:()=>o});var r=n(593787),i=n(881458);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new a(t,e))}}var a=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(i.L)},444531:(t,e,n)=>{"use strict";n.d(e,{J:()=>o});var r=n(516555),i=n(470432);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,r.zg)(i.y,t)}},516555:(t,e,n)=>{"use strict";n.d(e,{zg:()=>c});var r=n(593787),i=n(251796),o=n(895804),a=n(733381),s=n(858800),u=n(423713);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(c((function(n,r){return(0,u.D)(t(n,r)).pipe((0,s.U)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new l(t,n))})}var l=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project,this.concurrent))},t}(),f=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.L)},609917:(t,e,n)=>{"use strict";n.d(e,{O:()=>i});var r=n(91776);function i(t,e){return function(n){var i;if(i="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new o(i,e));var a=Object.create(n,r.N);return a.source=n,a.subjectFactory=i,a}}var o=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}()},605032:(t,e,n)=>{"use strict";n.d(e,{x:()=>o});var r=n(593787),i=n(881458);function o(){return function(t){return t.lift(new a(t))}}var a=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.L)},562972:(t,e,n)=>{"use strict";n.d(e,{B:()=>s});var r=n(609917),i=n(605032),o=n(17986);function a(){return new o.xQ}function s(){return function(t){return(0,i.x)()((0,r.O)(a)(t))}}},97093:(t,e,n)=>{"use strict";n.d(e,{w:()=>c});var r=n(593787),i=n(895804),o=n(733381),a=n(251796),s=n(858800),u=n(423713);function c(t,e){return"function"==typeof e?function(n){return n.pipe(c((function(n,r){return(0,u.D)(t(n,r)).pipe((0,s.U)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new l(t))}}var l=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.project))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new o.d(this,void 0,void 0);this.destination.add(i),this.innerSubscription=(0,a.D)(this,t,e,n,i)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e}(i.L)},227119:(t,e,n)=>{"use strict";n.d(e,{q:()=>s});var r=n(593787),i=n(881458),o=n(941881),a=n(332098);function s(t){return function(e){return 0===t?(0,a.cS)():e.lift(new u(t))}}var u=function(){function t(t){if(this.total=t,this.total<0)throw new o.W}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.total))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.L)},915632:(t,e,n)=>{"use strict";n.d(e,{o:()=>o});var r=n(593787),i=n(881458);function o(t){return function(e){return e.lift(new a(t))}}var a=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate))},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.index=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):n.complete()},e}(i.L)},868203:(t,e,n)=>{"use strict";n.d(e,{a:()=>i});var r=n(593787),i=function(t){function e(e,n){return t.call(this)||this}return r.ZT(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(660934).w)},352218:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(593787),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.ZT(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(i){n=!0,r=!!i&&i||new Error(i)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(n(868203).a)},565928:(t,e,n)=>{"use strict";n.d(e,{v:()=>o});var r=n(593787),i=n(958766),o=function(t){function e(n,r){void 0===r&&(r=i.b.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.ZT(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.b)},934276:(t,e,n)=>{"use strict";n.d(e,{P:()=>i});var r=n(352218),i=new(n(565928).v)(r.o)},991441:(t,e,n)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,{hZ:()=>i});var i=r()},137877:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},480851:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},941881:(t,e,n)=>{"use strict";function r(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}n.d(e,{W:()=>i}),r.prototype=Object.create(Error.prototype);var i=r},846196:(t,e,n)=>{"use strict";function r(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}n.d(e,{N:()=>i}),r.prototype=Object.create(Error.prototype);var i=r},542354:(t,e,n)=>{"use strict";function r(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}n.d(e,{B:()=>i}),r.prototype=Object.create(Error.prototype);var i=r},579956:(t,e,n)=>{"use strict";n.d(e,{_:()=>i});var r=n(881458);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.L?i:null}return!0}},770557:(t,e,n)=>{"use strict";n.d(e,{T:()=>r});var r={e:{}}},384496:(t,e,n)=>{"use strict";function r(t){setTimeout((function(){throw t}))}n.d(e,{z:()=>r})},470432:(t,e,n)=>{"use strict";function r(t){return t}n.d(e,{y:()=>r})},806242:(t,e,n)=>{"use strict";n.d(e,{k:()=>r});var r=Array.isArray||function(t){return t&&"number"==typeof t.length}},741976:(t,e,n)=>{"use strict";n.d(e,{z:()=>r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},534721:(t,e,n)=>{"use strict";function r(t){return"function"==typeof t}n.d(e,{m:()=>r})},37159:(t,e,n)=>{"use strict";n.d(e,{c:()=>i});var r=n(137877);function i(t){return t&&"function"==typeof t[r.L]}},356821:(t,e,n)=>{"use strict";n.d(e,{T:()=>i});var r=n(991441);function i(t){return t&&"function"==typeof t[r.hZ]}},423595:(t,e,n)=>{"use strict";function r(t){return null!=t&&"object"==typeof t}n.d(e,{K:()=>r})},656159:(t,e,n)=>{"use strict";function r(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{t:()=>r})},785789:(t,e,n)=>{"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,{K:()=>r})},900832:(t,e,n)=>{"use strict";function r(){}n.d(e,{Z:()=>r})},800336:(t,e,n)=>{"use strict";n.d(e,{U:()=>i});var r=n(900832);function i(t){return t?1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}:r.Z}},80506:(t,e,n)=>{"use strict";n.d(e,{s:()=>d});var r=n(487530),i=n(152005),o=n(635378),a=n(269284),s=n(915024),u=n(741976),c=n(656159),l=n(423595),f=n(991441),h=n(137877),d=function(t){if(t instanceof r.y)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[h.L])return(0,s.h)(t);if((0,u.z)(t))return(0,i.V)(t);if((0,c.t)(t))return(0,o.A)(t);if(t&&"function"==typeof t[f.hZ])return(0,a.u)(t);var e=(0,l.K)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},152005:(t,e,n)=>{"use strict";n.d(e,{V:()=>r});var r=function(t){return function(e){for(var n=0,r=t.length;n{"use strict";n.d(e,{u:()=>i});var r=n(991441),i=function(t){return function(e){for(var n=t[r.hZ]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add((function(){n.return&&n.return()})),e}}},915024:(t,e,n)=>{"use strict";n.d(e,{h:()=>i});var r=n(137877),i=function(t){return function(e){var n=t[r.L]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},635378:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(384496),i=function(t){return function(e){return t.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,r.z),e}}},251796:(t,e,n)=>{"use strict";n.d(e,{D:()=>o});var r=n(733381),i=n(80506);function o(t,e,n,o,a){if(void 0===a&&(a=new r.d(t,n,o)),!a.closed)return(0,i.s)(e)(a)}},864955:(t,e,n)=>{"use strict";n.d(e,{Y:()=>a});var r=n(881458),i=n(480851),o=n(483541);function a(t,e,n){if(t){if(t instanceof r.L)return t;if(t[i.b])return t[i.b]()}return t||e||n?new r.L(t,e,n):new r.L(o.c)}},471585:(t,e,n)=>{"use strict";n.d(e,{Y:()=>a});var r,i=n(770557);function o(){try{return r.apply(this,arguments)}catch(t){return i.T.e=t,i.T}}function a(t){return r=t,o}},503216:(t,e,n)=>{var r=n(470977),i=n(81681),o=n(860389),a=n(653392),s=n(548087),u=n(716877),c=n(546580);c.alea=r,c.xor128=i,c.xorwow=o,c.xorshift7=a,c.xor4096=s,c.tychei=u,t.exports=c},470977:function(t,e,n){var r;!function(t,i,o){function a(t){var e=this,n=function(){var t=4022871197,e=function(e){e=String(e);for(var n=0;n>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e}();e.next=function(){var t=2091639*e.s0+2.3283064365386963e-10*e.c;return e.s0=e.s1,e.s1=e.s2,e.s2=t-(e.c=0|t)},e.c=1,e.s0=n(" "),e.s1=n(" "),e.s2=n(" "),e.s0-=n(t),e.s0<0&&(e.s0+=1),e.s1-=n(t),e.s1<0&&(e.s1+=1),e.s2-=n(t),e.s2<0&&(e.s2+=1),n=null}function s(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function u(t,e){var n=new a(t),r=e&&e.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.alea=u}(0,t=n.nmd(t),n.amdD)},716877:function(t,e,n){var r;!function(t,i,o){function a(t){var e=this,n="";e.next=function(){var t=e.b,n=e.c,r=e.d,i=e.a;return t=t<<25^t>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-t|0,e.b=t=t<<20^t>>>12^n,e.c=n=n-r|0,e.d=r<<16^n>>>16^i,e.a=i-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):n+=t;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.tychei=u}(0,t=n.nmd(t),n.amdD)},81681:function(t,e,n){var r;!function(t,i,o){function a(t){var e=this,n="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:n+=t;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xor128=u}(0,t=n.nmd(t),n.amdD)},548087:function(t,e,n){var r;!function(t,i,o){function a(t){var e=this;e.next=function(){var t,n,r=e.w,i=e.X,o=e.i;return e.w=r=r+1640531527|0,n=i[o+34&127],t=i[o=o+1&127],n^=n<<13,t^=t<<17,n^=n>>>15,t^=t>>>12,n=i[o]=n^t,e.i=o,n+(r^r>>>16)|0},function(t,e){var n,r,i,o,a,s=[],u=128;for(e===(0|e)?(r=e,e=null):(e+="\0",r=0,u=Math.max(u,e.length)),i=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(a=a+1640531527|0,i=0==(n=s[127&o]^=r+a)?i+1:0);for(i>=128&&(s[127&(e&&e.length||0)]=-1),i=127,o=512;o>0;--o)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;t.w=a,t.X=s,t.i=i}(e,t)}function s(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function u(t,e){null==t&&(t=+new Date);var n=new a(t),r=e&&e.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&(r.X&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xor4096=u}(0,t=n.nmd(t),n.amdD)},653392:function(t,e,n){var r;!function(t,i,o){function a(t){var e=this;e.next=function(){var t,n,r=e.x,i=e.i;return t=r[i],n=(t^=t>>>7)^t<<24,n^=(t=r[i+1&7])^t>>>10,n^=(t=r[i+3&7])^t>>>3,n^=(t=r[i+4&7])^t<<7,t=r[i+7&7],n^=(t^=t<<13)^t<<9,r[i]=n,e.i=i+1&7,n},function(t,e){var n,r=[];if(e===(0|e))r[0]=e;else for(e=""+e,n=0;n0;--n)t.next()}(e,t)}function s(t,e){return e.x=t.x.slice(),e.i=t.i,e}function u(t,e){null==t&&(t=+new Date);var n=new a(t),r=e&&e.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&(r.x&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xorshift7=u}(0,t=n.nmd(t),n.amdD)},860389:function(t,e,n){var r;!function(t,i,o){function a(t){var e=this,n="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:n+=t;for(var r=0;r>>4),e.next()}function s(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function u(t,e){var n=new a(t),r=e&&e.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var t=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},i.int32=n.next,i.quick=i,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=u:n.amdD&&n.amdO?void 0===(r=function(){return u}.call(e,n,e,i))||(i.exports=r):this.xorwow=u}(0,t=n.nmd(t),n.amdD)},546580:function(t,e,n){var r;!function(i,o,a){var s,u=256,c=a.pow(u,6),l=a.pow(2,52),f=2*l,h=u-1;function d(t,e,n){var r=[],h=y(m((e=1==e?{entropy:!0}:e||{}).entropy?[t,v(o)]:null==t?function(){try{var t;return s&&(t=s.randomBytes)?t=t(u):(t=new Uint8Array(u),(i.crypto||i.msCrypto).getRandomValues(t)),v(t)}catch(r){var e=i.navigator,n=e&&e.plugins;return[+new Date,i,n,i.screen,v(o)]}}():t,3),r),d=new p(r),b=function(){for(var t=d.g(6),e=c,n=0;t=f;)t/=2,e/=2,n>>>=1;return(t+n)/e};return b.int32=function(){return 0|d.g(4)},b.quick=function(){return d.g(4)/4294967296},b.double=b,y(v(d.S),o),(e.pass||n||function(t,e,n,r){return r&&(r.S&&g(r,d),t.state=function(){return g(d,{})}),n?(a.random=t,e):t})(b,h,"global"in e?e.global:this==a,e.state)}function p(t){var e,n=t.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(t=[n++]);i{"use strict";var r,i=n(631400);t=n.hmd(t),r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:t;(0,i.Z)(r)},631400:(t,e,n)=>{"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}n.d(e,{Z:()=>r})},741137:(t,e,n)=>{"use strict";n.d(e,{Wq:()=>x,ht:()=>T});var r=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],i=r.join(","),o="undefined"==typeof Element,a=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=!o&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},u=function t(e,n){var r;void 0===n&&(n=!0);var i=null==e||null===(r=e.getAttribute)||void 0===r?void 0:r.call(e,"inert");return""===i||"true"===i||n&&e&&t(e.parentNode)},c=function(t,e,n){if(u(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(i));return e&&a.call(t,i)&&r.unshift(t),r=r.filter(n)},l=function t(e,n,r){for(var o=[],s=Array.from(e);s.length;){var c=s.shift();if(!u(c,!1))if("SLOT"===c.tagName){var l=c.assignedElements(),f=t(l.length?l:c.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:c,candidates:f})}else{a.call(c,i)&&r.filter(c)&&(n||!e.includes(c))&&o.push(c);var h=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),d=!u(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c));if(h&&d){var p=t(!0===h?c.children:h.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:c,candidates:p})}else s.unshift.apply(s,c.children)}}return o},f=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},h=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!f(t)?0:t.tabIndex},d=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},p=function(t){return"INPUT"===t.tagName},g=function(t){return function(t){return p(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||s(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var i=function(t,e){for(var n=0;nsummary:first-of-type")?t.parentElement:t;if(a.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return m(t)}else{if("function"==typeof r){for(var o=t;t;){var u=t.parentElement,c=s(t);if(u&&!u.shadowRoot&&!0===r(u))return m(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=o}if(function(t){var e,n,r,i,o=t&&s(t),a=null===(e=o)||void 0===e?void 0:e.host,u=!1;if(o&&o!==t)for(u=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=t&&null!==(i=t.ownerDocument)&&void 0!==i&&i.contains(t));!u&&a;){var c,l,f;u=!(null===(l=a=null===(c=o=s(a))||void 0===c?void 0:c.host)||void 0===l||null===(f=l.ownerDocument)||void 0===f||!f.contains(a))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},v=function(t,e){return!(e.disabled||u(e)||function(t){return p(t)&&"hidden"===t.type}(e)||y(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n=0)},E=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scopeParent,a=o?e.scopeParent:e,s=function(t,e){var n=h(t);return n<0&&e&&!f(t)?0:n}(a,o),u=o?t(e.candidates):a;0===s?o?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:s,item:e,isScope:o,content:u})})),r.sort(d).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},T=function(t,e){var n;return n=(e=e||{}).getShadowRoot?l([t],e.includeContainer,{filter:b.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:w}):c(t,e.includeContainer,b.bind(null,e)),E(n)},x=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==a.call(t,i)&&b(e,t)}},196750:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r="Invariant failed";const i=function(t,e){if(!t)throw new Error(r)}},593787:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>i});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},83780:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};const i=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));var i=void 0===e?"undefined":r(e);if(i!==(void 0===n?"undefined":r(n)))return!1;if("object"===i){var o=e.valueOf(),a=n.valueOf();if(o!==e||a!==n)return t(o,a);var s=Object.keys(e),u=Object.keys(n);return s.length===u.length&&s.every((function(r){return t(e[r],n[r])}))}return!1}},552170:(t,e,n)=>{var r;!function(){function i(t,e,n){return t.call.apply(t.bind,arguments)}function o(t,e,n){if(!t)throw Error();if(2=e.f?i():t.fonts.load(function(t){return S(t)+" "+t.f+"00 300px "+x(t.c)}(e.a),e.h).then((function(t){1<=t.length?r():setTimeout(o,25)}),(function(){i()}))}()})),i=null,o=new Promise((function(t,n){i=setTimeout(n,e.f)}));Promise.race([o,r]).then((function(){i&&(clearTimeout(i),i=null),e.g(e.a)}),(function(){e.j(e.a)}))};var j={D:"serif",C:"sans-serif"},D=null;function B(){if(null===D){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);D=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return D}function U(t,e,n){for(var r in j)if(j.hasOwnProperty(r)&&e===t.f[j[r]]&&n===t.f[j[r]])return!0;return!1}function F(t){var e,n=t.g.a.offsetWidth,r=t.h.a.offsetWidth;(e=n===t.f.serif&&r===t.f["sans-serif"])||(e=B()&&U(t,n,r)),e?s()-t.A>=t.w?B()&&U(t,n,r)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?H(t,t.v):H(t,t.B):function(t){setTimeout(a((function(){F(this)}),t),50)}(t):H(t,t.v)}function H(t,e){setTimeout(a((function(){h(this.g.a),h(this.h.a),h(this.j.a),h(this.m.a),e(this.a)}),t),0)}function V(t,e,n){this.c=t,this.a=e,this.f=0,this.m=this.j=!1,this.s=n}M.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=s(),F(this)};var G=null;function q(t){0==--t.f&&t.j&&(t.m?((t=t.a).g&&d(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),C(t,"active")):R(t.a))}function z(t){this.j=t,this.a=new k,this.h=0,this.f=this.g=!0}function K(t,e,n,r,i){var o=0==--t.h;(t.f||t.g)&&setTimeout((function(){var t=i||null,s=r||{};if(0===n.length&&o)R(e.a);else{e.f+=n.length,o&&(e.j=o);var u,c=[];for(u=0;u{},993864:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t="",e=0;e{"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:()=>r})},110519:(t,e,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;er})},982721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(565482);function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,(0,r.Z)(t,e)}},122293:(t,e,n)=>{"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}n.d(e,{Z:()=>r})},565482:(t,e,n)=>{"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{Z:()=>r})},474183:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>h,Qo:()=>p,RR:()=>c,US:()=>a,X5:()=>u,cv:()=>g,dp:()=>v,dr:()=>y,oo:()=>o,uY:()=>m,x7:()=>s});var r=n(573662);function i(t,e,n){let{reference:i,floating:o}=t;const a=(0,r.Qq)(e),s=(0,r.Wh)(e),u=(0,r.I4)(s),c=(0,r.k3)(e),l="y"===a,f=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,d=i[u]/2-o[u]/2;let p;switch(c){case"top":p={x:f,y:i.y-o.height};break;case"bottom":p={x:f,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:h};break;case"left":p={x:i.x-o.width,y:h};break;default:p={x:i.x,y:i.y}}switch((0,r.hp)(e)){case"start":p[s]-=d*(n&&l?-1:1);break;case"end":p[s]+=d*(n&&l?-1:1)}return p}const o=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,u=a.filter(Boolean),c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:h}=i(l,r,c),d=r,p={},g=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:a,platform:s,elements:u,middlewareData:c}=e,{element:l,padding:f=0}=(0,r.ku)(t,e)||{};if(null==l)return{};const h=(0,r.yd)(f),d={x:n,y:i},p=(0,r.Wh)(o),g=(0,r.I4)(p),m=await s.getDimensions(l),y="y"===p,v=y?"top":"left",b=y?"bottom":"right",w=y?"clientHeight":"clientWidth",E=a.reference[g]+a.reference[p]-d[p]-a.floating[g],T=d[p]-a.reference[p],x=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let A=x?x[w]:0;A&&await(null==s.isElement?void 0:s.isElement(x))||(A=u.floating[w]||a.floating[g]);const S=E/2-T/2,_=A/2-m[g]/2-1,O=(0,r.VV)(h[v],_),R=(0,r.VV)(h[b],_),C=O,k=A-m[g]-R,N=A/2-m[g]/2+S,I=(0,r.uZ)(C,N,k),P=!c.arrow&&null!=(0,r.hp)(o)&&N!==I&&a.reference[g]/2-(N(0,r.hp)(e)===t)),...n.filter((e=>(0,r.hp)(e)!==t))]:n.filter((t=>(0,r.k3)(t)===t))).filter((n=>!t||(0,r.hp)(n)===t||!!e&&(0,r.Go)(n)!==n))}(d||null,g,p):p,v=await a(e,m),b=(null==(n=u.autoPlacement)?void 0:n.index)||0,w=y[b];if(null==w)return{};const E=(0,r.i8)(w,s,await(null==l.isRTL?void 0:l.isRTL(f.floating)));if(c!==w)return{reset:{placement:y[0]}};const T=[v[(0,r.k3)(w)],v[E[0]],v[E[1]]],x=[...(null==(i=u.autoPlacement)?void 0:i.overflows)||[],{placement:w,overflows:T}],A=y[b+1];if(A)return{data:{index:b+1,overflows:x},reset:{placement:A}};const S=x.map((t=>{const e=(0,r.hp)(t.placement);return[t.placement,e&&h?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),_=(null==(o=S.filter((t=>t[2].slice(0,(0,r.hp)(t[0])?2:3).every((t=>t<=0))))[0])?void 0:o[0])||S[0][0];return _!==c?{data:{index:b+1,overflows:x},reset:{placement:_}}:{}}}},c=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:s,rects:u,initialPlacement:c,platform:l,elements:f}=e,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...v}=(0,r.ku)(t,e);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};const b=(0,r.k3)(o),w=(0,r.k3)(c)===c,E=await(null==l.isRTL?void 0:l.isRTL(f.floating)),T=p||(w||!y?[(0,r.pw)(c)]:(0,r.gy)(c));p||"none"===m||T.push(...(0,r.KX)(c,y,m,E));const x=[c,...T],A=await a(e,v),S=[];let _=(null==(i=s.flip)?void 0:i.overflows)||[];if(h&&S.push(A[b]),d){const t=(0,r.i8)(o,u,E);S.push(A[t[0]],A[t[1]])}if(_=[..._,{placement:o,overflows:S}],!S.every((t=>t<=0))){var O,R;const t=((null==(O=s.flip)?void 0:O.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:_},reset:{placement:e}};let n=null==(R=_.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:R.placement;if(!n)switch(g){case"bestFit":{var C;const t=null==(C=_.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(n=t);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}};function l(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function f(t){return r.mA.some((e=>t[e]>=0))}const h=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...o}=(0,r.ku)(t,e);switch(i){case"referenceHidden":{const t=l(await a(e,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:f(t)}}}case"escaped":{const t=l(await a(e,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:f(t)}}}default:return{}}}}};function d(t){const e=(0,r.VV)(...t.map((t=>t.left))),n=(0,r.VV)(...t.map((t=>t.top)));return{x:e,y:n,width:(0,r.Fp)(...t.map((t=>t.right)))-e,height:(0,r.Fp)(...t.map((t=>t.bottom)))-n}}const p=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:i,rects:o,platform:a,strategy:s}=e,{padding:u=2,x:c,y:l}=(0,r.ku)(t,e),f=Array.from(await(null==a.getClientRects?void 0:a.getClientRects(i.reference))||[]),h=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),n=[];let i=null;for(let r=0;ri.height/2?n.push([t]):n[n.length-1].push(t),i=t}return n.map((t=>(0,r.JB)(d(t))))}(f),p=(0,r.JB)(d(f)),g=(0,r.yd)(u);const m=await a.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-g.left&&ct.top-g.top&&l=2){if("y"===(0,r.Qq)(n)){const t=h[0],e=h[h.length-1],i="top"===(0,r.k3)(n),o=t.top,a=e.bottom,s=i?t.left:e.left,u=i?t.right:e.right;return{top:o,bottom:a,left:s,right:u,width:u-s,height:a-o,x:s,y:o}}const t="left"===(0,r.k3)(n),e=(0,r.Fp)(...h.map((t=>t.right))),i=(0,r.VV)(...h.map((t=>t.left))),o=h.filter((n=>t?n.left===i:n.right===e)),a=o[0].top,s=o[o.length-1].bottom;return{top:a,bottom:s,left:i,right:e,width:e-i,height:s-a,x:i,y:a}}return p}},floating:i.floating,strategy:s});return o.reference.x!==m.reference.x||o.reference.y!==m.reference.y||o.reference.width!==m.reference.width||o.reference.height!==m.reference.height?{reset:{rects:m}}:{}}}};const g=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:a,placement:s,middlewareData:u}=e,c=await async function(t,e){const{placement:n,platform:i,elements:o}=t,a=await(null==i.isRTL?void 0:i.isRTL(o.floating)),s=(0,r.k3)(n),u=(0,r.hp)(n),c="y"===(0,r.Qq)(n),l=["left","top"].includes(s)?-1:1,f=a&&c?-1:1,h=(0,r.ku)(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:g}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return u&&"number"==typeof g&&(p="end"===u?-1*g:g),c?{x:p*f,y:d*l}:{x:d*l,y:p*f}}(e,t);return s===(null==(n=u.offset)?void 0:n.placement)&&null!=(i=u.arrow)&&i.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},m=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:s=!0,crossAxis:u=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=(0,r.ku)(t,e),f={x:n,y:i},h=await a(e,l),d=(0,r.Qq)((0,r.k3)(o)),p=(0,r.Rn)(d);let g=f[p],m=f[d];if(s){const t="y"===p?"bottom":"right",e=g+h["y"===p?"top":"left"],n=g-h[t];g=(0,r.uZ)(e,g,n)}if(u){const t="y"===d?"bottom":"right",e=m+h["y"===d?"top":"left"],n=m-h[t];m=(0,r.uZ)(e,m,n)}const y=c.fn({...e,[p]:g,[d]:m});return{...y,data:{x:y.x-n,y:y.y-i}}}}},y=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:o,rects:a,middlewareData:s}=e,{offset:u=0,mainAxis:c=!0,crossAxis:l=!0}=(0,r.ku)(t,e),f={x:n,y:i},h=(0,r.Qq)(o),d=(0,r.Rn)(h);let p=f[d],g=f[h];const m=(0,r.ku)(u,e),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const t="y"===d?"height":"width",e=a.reference[d]-a.floating[t]+y.mainAxis,n=a.reference[d]+a.reference[t]-y.mainAxis;pn&&(p=n)}if(l){var v,b;const t="y"===d?"width":"height",e=["top","left"].includes((0,r.k3)(o)),n=a.reference[h]-a.floating[t]+(e&&(null==(v=s.offset)?void 0:v[h])||0)+(e?0:y.crossAxis),i=a.reference[h]+a.reference[t]+(e?0:(null==(b=s.offset)?void 0:b[h])||0)-(e?y.crossAxis:0);gi&&(g=i)}return{[d]:p,[h]:g}}}},v=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:i,platform:o,elements:s}=e,{apply:u=(()=>{}),...c}=(0,r.ku)(t,e),l=await a(e,c),f=(0,r.k3)(n),h=(0,r.hp)(n),d="y"===(0,r.Qq)(n),{width:p,height:g}=i.floating;let m,y;"top"===f||"bottom"===f?(m=f,y=h===(await(null==o.isRTL?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,m="end"===h?"top":"bottom");const v=g-l.top-l.bottom,b=p-l.left-l.right,w=(0,r.VV)(g-l[m],v),E=(0,r.VV)(p-l[y],b),T=!e.middlewareData.shift;let x=w,A=E;if(d?A=h||T?(0,r.VV)(E,b):b:x=h||T?(0,r.VV)(w,v):v,T&&!h){const t=(0,r.Fp)(l.left,0),e=(0,r.Fp)(l.right,0),n=(0,r.Fp)(l.top,0),i=(0,r.Fp)(l.bottom,0);d?A=p-2*(0!==t||0!==e?t+e:(0,r.Fp)(l.left,l.right)):x=g-2*(0!==n||0!==i?n+i:(0,r.Fp)(l.top,l.bottom))}await u({...e,availableWidth:A,availableHeight:x});const S=await o.getDimensions(s.floating);return p!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}}},84186:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>C,Jv:()=>E,Me:()=>T,Qo:()=>N,RR:()=>O,US:()=>x,X5:()=>S,cv:()=>A,dp:()=>R,dr:()=>I,oo:()=>P,uY:()=>_,x7:()=>k});var r=n(573662),i=n(474183),o=n(291477);function a(t){const e=(0,o.Dx)(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const a=(0,o.Re)(t),s=a?t.offsetWidth:n,u=a?t.offsetHeight:i,c=(0,r.NM)(n)!==s||(0,r.NM)(i)!==u;return c&&(n=s,i=u),{width:n,height:i,$:c}}function s(t){return(0,o.kK)(t)?t:t.contextElement}function u(t){const e=s(t);if(!(0,o.Re)(e))return(0,r.ze)(1);const n=e.getBoundingClientRect(),{width:i,height:u,$:c}=a(e);let l=(c?(0,r.NM)(n.width):n.width)/i,f=(c?(0,r.NM)(n.height):n.height)/u;return l&&Number.isFinite(l)||(l=1),f&&Number.isFinite(f)||(f=1),{x:l,y:f}}const c=(0,r.ze)(0);function l(t){const e=(0,o.Jj)(t);return(0,o.Pf)()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:c}function f(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const a=t.getBoundingClientRect(),c=s(t);let f=(0,r.ze)(1);e&&(i?(0,o.kK)(i)&&(f=u(i)):f=u(t));const h=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==(0,o.Jj)(t))&&e}(c,n,i)?l(c):(0,r.ze)(0);let d=(a.left+h.x)/f.x,p=(a.top+h.y)/f.y,g=a.width/f.x,m=a.height/f.y;if(c){const t=(0,o.Jj)(c),e=i&&(0,o.kK)(i)?(0,o.Jj)(i):i;let n=t,r=n.frameElement;for(;r&&i&&e!==n;){const t=u(r),e=r.getBoundingClientRect(),i=(0,o.Dx)(r),a=e.left+(r.clientLeft+parseFloat(i.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(i.paddingTop))*t.y;d*=t.x,p*=t.y,g*=t.x,m*=t.y,d+=a,p+=s,n=(0,o.Jj)(r),r=n.frameElement}}return(0,r.JB)({width:g,height:m,x:d,y:p})}const h=[":popover-open",":modal"];function d(t){return h.some((e=>{try{return t.matches(e)}catch(n){return!1}}))}function p(t){return f((0,o.tF)(t)).left+(0,o.Lw)(t).scrollLeft}function g(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=(0,o.Jj)(t),r=(0,o.tF)(t),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,u=0,c=0;if(i){a=i.width,s=i.height;const t=(0,o.Pf)();(!t||t&&"fixed"===e)&&(u=i.offsetLeft,c=i.offsetTop)}return{width:a,height:s,x:u,y:c}}(t,n);else if("document"===e)i=function(t){const e=(0,o.tF)(t),n=(0,o.Lw)(t),i=t.ownerDocument.body,a=(0,r.Fp)(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=(0,r.Fp)(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+p(t);const c=-n.scrollTop;return"rtl"===(0,o.Dx)(i).direction&&(u+=(0,r.Fp)(e.clientWidth,i.clientWidth)-a),{width:a,height:s,x:u,y:c}}((0,o.tF)(t));else if((0,o.kK)(e))i=function(t,e){const n=f(t,!0,"fixed"===e),i=n.top+t.clientTop,a=n.left+t.clientLeft,s=(0,o.Re)(t)?u(t):(0,r.ze)(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:a*s.x,y:i*s.y}}(e,n);else{const n=l(t);i={...e,x:e.x-n.x,y:e.y-n.y}}return(0,r.JB)(i)}function m(t,e){const n=(0,o.Ow)(t);return!(n===e||!(0,o.kK)(n)||(0,o.Py)(n))&&("fixed"===(0,o.Dx)(n).position||m(n,e))}function y(t,e,n){const i=(0,o.Re)(e),a=(0,o.tF)(e),s="fixed"===n,u=f(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=(0,r.ze)(0);if(i||!i&&!s)if(("body"!==(0,o.wk)(e)||(0,o.ao)(a))&&(c=(0,o.Lw)(e)),i){const t=f(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else a&&(l.x=p(a));return{x:u.left+c.scrollLeft-l.x,y:u.top+c.scrollTop-l.y,width:u.width,height:u.height}}function v(t){return"static"===(0,o.Dx)(t).position}function b(t,e){return(0,o.Re)(t)&&"fixed"!==(0,o.Dx)(t).position?e?e(t):t.offsetParent:null}function w(t,e){const n=(0,o.Jj)(t);if(d(t))return n;if(!(0,o.Re)(t)){let e=(0,o.Ow)(t);for(;e&&!(0,o.Py)(e);){if((0,o.kK)(e)&&!v(e))return e;e=(0,o.Ow)(e)}return n}let r=b(t,e);for(;r&&(0,o.Ze)(r)&&v(r);)r=b(r,e);return r&&(0,o.Py)(r)&&v(r)&&!(0,o.hT)(r)?n:r||(0,o.gQ)(t)||n}const E={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:a}=t;const s="fixed"===a,c=(0,o.tF)(i),l=!!e&&d(e.floating);if(i===c||l&&s)return n;let h={scrollLeft:0,scrollTop:0},p=(0,r.ze)(1);const g=(0,r.ze)(0),m=(0,o.Re)(i);if((m||!m&&!s)&&(("body"!==(0,o.wk)(i)||(0,o.ao)(c))&&(h=(0,o.Lw)(i)),(0,o.Re)(i))){const t=f(i);p=u(i),g.x=t.x+i.clientLeft,g.y=t.y+i.clientTop}return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-h.scrollLeft*p.x+g.x,y:n.y*p.y-h.scrollTop*p.y+g.y}},getDocumentElement:o.tF,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:a}=t;const s=[..."clippingAncestors"===n?d(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=(0,o.Kx)(t,[],!1).filter((t=>(0,o.kK)(t)&&"body"!==(0,o.wk)(t))),i=null;const a="fixed"===(0,o.Dx)(t).position;let s=a?(0,o.Ow)(t):t;for(;(0,o.kK)(s)&&!(0,o.Py)(s);){const e=(0,o.Dx)(s),n=(0,o.hT)(s);n||"fixed"!==e.position||(i=null),(a?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||(0,o.ao)(s)&&!n&&m(t,s))?r=r.filter((t=>t!==s)):i=e,s=(0,o.Ow)(s)}return e.set(t,r),r}(e,this._c):[].concat(n),i],u=s[0],c=s.reduce(((t,n)=>{const i=g(e,n,a);return t.top=(0,r.Fp)(i.top,t.top),t.right=(0,r.VV)(i.right,t.right),t.bottom=(0,r.VV)(i.bottom,t.bottom),t.left=(0,r.Fp)(i.left,t.left),t}),g(e,u,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:w,getElementRects:async function(t){const e=this.getOffsetParent||w,n=this.getDimensions,r=await n(t.floating);return{reference:y(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=a(t);return{width:e,height:n}},getScale:u,isElement:o.kK,isRTL:function(t){return"rtl"===(0,o.Dx)(t).direction}};function T(t,e,n,i){void 0===i&&(i={});const{ancestorScroll:a=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:h=!1}=i,d=s(t),p=a||u?[...d?(0,o.Kx)(d):[],...(0,o.Kx)(e)]:[];p.forEach((t=>{a&&t.addEventListener("scroll",n,{passive:!0}),u&&t.addEventListener("resize",n)}));const g=d&&l?function(t,e){let n,i=null;const a=(0,o.tF)(t);function s(){var t;clearTimeout(n),null==(t=i)||t.disconnect(),i=null}return function o(u,c){void 0===u&&(u=!1),void 0===c&&(c=1),s();const{left:l,top:f,width:h,height:d}=t.getBoundingClientRect();if(u||e(),!h||!d)return;const p={rootMargin:-(0,r.GW)(f)+"px "+-(0,r.GW)(a.clientWidth-(l+h))+"px "+-(0,r.GW)(a.clientHeight-(f+d))+"px "+-(0,r.GW)(l)+"px",threshold:(0,r.Fp)(0,(0,r.VV)(1,c))||1};let g=!0;function m(t){const e=t[0].intersectionRatio;if(e!==c){if(!g)return o();e?o(!1,e):n=setTimeout((()=>{o(!1,1e-7)}),1e3)}g=!1}try{i=new IntersectionObserver(m,{...p,root:a.ownerDocument})}catch(y){i=new IntersectionObserver(m,p)}i.observe(t)}(!0),s}(d,n):null;let m,y=-1,v=null;c&&(v=new ResizeObserver((t=>{let[r]=t;r&&r.target===d&&v&&(v.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame((()=>{var t;null==(t=v)||t.observe(e)}))),n()})),d&&!h&&v.observe(d),v.observe(e));let b=h?f(t):null;return h&&function e(){const r=f(t);!b||r.x===b.x&&r.y===b.y&&r.width===b.width&&r.height===b.height||n();b=r,m=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach((t=>{a&&t.removeEventListener("scroll",n),u&&t.removeEventListener("resize",n)})),null==g||g(),null==(t=v)||t.disconnect(),v=null,h&&cancelAnimationFrame(m)}}const x=i.US,A=i.cv,S=i.X5,_=i.uY,O=i.RR,R=i.dp,C=i.Cp,k=i.x7,N=i.Qo,I=i.dr,P=(t,e,n)=>{const r=new Map,o={platform:E,...n},a={...o.platform,_c:r};return(0,i.oo)(t,e,{...o,platform:a})}},694788:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>m,RR:()=>g,YF:()=>f,cv:()=>d,uY:()=>p,x7:()=>y});var r=n(84186),i=n(875604),o=n(204358),a="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function s(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if("function"==typeof t&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&"object"==typeof t){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;0!=r--;)if(!s(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;0!=r--;){const n=i[r];if(("_owner"!==n||!t.$$typeof)&&!s(t[n],e[n]))return!1}return!0}return t!=t&&e!=e}function u(t){if("undefined"==typeof window)return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function c(t,e){const n=u(t);return Math.round(e*n)/n}function l(t){const e=i.useRef(t);return a((()=>{e.current=t})),e}function f(t){void 0===t&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:f=[],platform:h,elements:{reference:d,floating:p}={},transform:g=!0,whileElementsMounted:m,open:y}=t,[v,b]=i.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[w,E]=i.useState(f);s(w,f)||E(f);const[T,x]=i.useState(null),[A,S]=i.useState(null),_=i.useCallback((t=>{t!==k.current&&(k.current=t,x(t))}),[]),O=i.useCallback((t=>{t!==N.current&&(N.current=t,S(t))}),[]),R=d||T,C=p||A,k=i.useRef(null),N=i.useRef(null),I=i.useRef(v),P=null!=m,L=l(m),M=l(h),j=i.useCallback((()=>{if(!k.current||!N.current)return;const t={placement:e,strategy:n,middleware:w};M.current&&(t.platform=M.current),(0,r.oo)(k.current,N.current,t).then((t=>{const e={...t,isPositioned:!0};D.current&&!s(I.current,e)&&(I.current=e,o.flushSync((()=>{b(e)})))}))}),[w,e,n,M]);a((()=>{!1===y&&I.current.isPositioned&&(I.current.isPositioned=!1,b((t=>({...t,isPositioned:!1}))))}),[y]);const D=i.useRef(!1);a((()=>(D.current=!0,()=>{D.current=!1})),[]),a((()=>{if(R&&(k.current=R),C&&(N.current=C),R&&C){if(L.current)return L.current(R,C,j);j()}}),[R,C,j,L,P]);const B=i.useMemo((()=>({reference:k,floating:N,setReference:_,setFloating:O})),[_,O]),U=i.useMemo((()=>({reference:R,floating:C})),[R,C]),F=i.useMemo((()=>{const t={position:n,left:0,top:0};if(!U.floating)return t;const e=c(U.floating,v.x),r=c(U.floating,v.y);return g?{...t,transform:"translate("+e+"px, "+r+"px)",...u(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:e,top:r}}),[n,g,U.floating,v.x,v.y]);return i.useMemo((()=>({...v,update:j,refs:B,elements:U,floatingStyles:F})),[v,j,B,U,F])}const h=t=>({name:"arrow",options:t,fn(e){const{element:n,padding:i}="function"==typeof t?t(e):t;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?(0,r.x7)({element:n.current,padding:i}).fn(e):{}:n?(0,r.x7)({element:n,padding:i}).fn(e):{};var o}}),d=(t,e)=>({...(0,r.cv)(t),options:[t,e]}),p=(t,e)=>({...(0,r.uY)(t),options:[t,e]}),g=(t,e)=>({...(0,r.RR)(t),options:[t,e]}),m=(t,e)=>({...(0,r.Cp)(t),options:[t,e]}),y=(t,e)=>({...h(t),options:[t,e]})},725352:(t,e,n)=>{"use strict";var r;n.d(e,{YF:()=>_});var i=n(875604),o=(n(187128),n(573662),n(84186),n(291477)),a=n(694788);n(741137),n(204358);const s={...r||(r=n.t(i,2))},u=s.useInsertionEffect||(t=>t());function c(t){const e=i.useRef((()=>{0}));return u((()=>{e.current=t})),i.useCallback((function(){for(var t=arguments.length,n=new Array(t),r=0;r"floating-ui-"+Math.random().toString(36).slice(2,6)+v++;const w=s.useId||function(){const[t,e]=i.useState((()=>y?b():void 0));return p((()=>{null==t&&e(b())}),[]),i.useEffect((()=>{y=!0}),[]),t};function E(){const t=new Map;return{emit(e,n){var r;null==(r=t.get(e))||r.forEach((t=>t(n)))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){var r;t.set(e,(null==(r=t.get(e))?void 0:r.filter((t=>t!==n)))||[])}}}const T=i.createContext(null),x=i.createContext(null),A=()=>{var t;return(null==(t=i.useContext(T))?void 0:t.id)||null},S=()=>i.useContext(x);function _(t){void 0===t&&(t={});const{nodeId:e}=t,n=function(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=w(),a=i.useRef({}),[s]=i.useState((()=>E())),u=null!=A(),[l,f]=i.useState(r.reference),h=c(((t,e,r)=>{a.current.openEvent=t?e:void 0,s.emit("openchange",{open:t,event:e,reason:r,nested:u}),null==n||n(t,e,r)})),d=i.useMemo((()=>({setPositionReference:f})),[]),p=i.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return i.useMemo((()=>({dataRef:a,open:e,onOpenChange:h,elements:p,events:s,floatingId:o,refs:d})),[e,h,p,s,o,d])}({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,s=r.elements,[u,l]=i.useState(null),[f,h]=i.useState(null),d=(null==s?void 0:s.reference)||u,g=i.useRef(null),m=S();p((()=>{d&&(g.current=d)}),[d]);const y=(0,a.YF)({...t,elements:{...s,...f&&{reference:f}}}),v=i.useCallback((t=>{const e=(0,o.kK)(t)?{getBoundingClientRect:()=>t.getBoundingClientRect(),contextElement:t}:t;h(e),y.refs.setReference(e)}),[y.refs]),b=i.useCallback((t=>{((0,o.kK)(t)||null===t)&&(g.current=t,l(t)),((0,o.kK)(y.refs.reference.current)||null===y.refs.reference.current||null!==t&&!(0,o.kK)(t))&&y.refs.setReference(t)}),[y.refs]),T=i.useMemo((()=>({...y.refs,setReference:b,setPositionReference:v,domReference:g})),[y.refs,b,v]),x=i.useMemo((()=>({...y.elements,domReference:d})),[y.elements,d]),_=i.useMemo((()=>({...y,...r,refs:T,elements:x,nodeId:e})),[y,T,x,e,r]);return p((()=>{r.dataRef.current.floatingContext=_;const t=null==m?void 0:m.nodesRef.current.find((t=>t.id===e));t&&(t.context=_)})),i.useMemo((()=>({...y,context:_,refs:T,elements:x})),[y,T,x,_])}},187128:(t,e,n)=>{"use strict";n.d(e,{AW:()=>i,G6:()=>l,Ie:()=>T,MM:()=>p,Me:()=>m,Pe:()=>y,U9:()=>v,V5:()=>h,Xf:()=>a,Zj:()=>u,cr:()=>c,ex:()=>g,ij:()=>s,j7:()=>w,p7:()=>E,r:()=>d,r3:()=>o});var r=n(291477);function i(t){let e=t.activeElement;for(;null!=(null==(n=e)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;e=e.shadowRoot.activeElement}return e}function o(t,e){if(!t||!e)return!1;const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&(0,r.Zq)(n)){let n=e;for(;n;){if(t===n)return!0;n=n.parentNode||n.host}}return!1}function a(){const t=navigator.userAgentData;return null!=t&&t.platform?t.platform:navigator.platform}function s(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map((t=>{let{brand:e,version:n}=t;return e+"/"+n})).join(" "):navigator.userAgent}function u(t){return!(0!==t.mozInputSource||!t.isTrusted)||(f()&&t.pointerType?"click"===t.type&&1===t.buttons:0===t.detail&&!t.pointerType)}function c(t){return!s().includes("jsdom/")&&(!f()&&0===t.width&&0===t.height||f()&&1===t.width&&1===t.height&&0===t.pressure&&0===t.detail&&"mouse"===t.pointerType||t.width<1&&t.height<1&&0===t.pressure&&0===t.detail&&"touch"===t.pointerType)}function l(){return/apple/i.test(navigator.vendor)}function f(){const t=/android/i;return t.test(a())||t.test(s())}function h(){return a().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function d(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function p(t){return"nativeEvent"in t}function g(t){return t.matches("html,body")}function m(t){return(null==t?void 0:t.ownerDocument)||document}function y(t,e){if(null==e)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return null!=n.target&&e.contains(n.target)}function v(t){return"composedPath"in t?t.composedPath()[0]:t.target}const b="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function w(t){return(0,r.Re)(t)&&t.matches(b)}function E(t){t.preventDefault(),t.stopPropagation()}function T(t){return!!t&&("combobox"===t.getAttribute("role")&&w(t))}},291477:(t,e,n)=>{"use strict";function r(t){return a(t)?(t.nodeName||"").toLowerCase():"#document"}function i(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){var e;return null==(e=(a(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function a(t){return t instanceof Node||t instanceof i(t).Node}function s(t){return t instanceof Element||t instanceof i(t).Element}function u(t){return t instanceof HTMLElement||t instanceof i(t).HTMLElement}function c(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof i(t).ShadowRoot)}function l(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=m(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function f(t){return["table","td","th"].includes(r(t))}function h(t){const e=p(),n=m(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function d(t){let e=v(t);for(;u(e)&&!g(e);){if(h(e))return e;e=v(e)}return null}function p(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function g(t){return["html","body","#document"].includes(r(t))}function m(t){return i(t).getComputedStyle(t)}function y(t){return s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function v(t){if("html"===r(t))return t;const e=t.assignedSlot||t.parentNode||c(t)&&t.host||o(t);return c(e)?e.host:e}function b(t){const e=v(t);return g(e)?t.ownerDocument?t.ownerDocument.body:t.body:u(e)&&l(e)?e:b(e)}function w(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=b(t),a=o===(null==(r=t.ownerDocument)?void 0:r.body),s=i(o);return a?e.concat(s,s.visualViewport||[],l(o)?o:[],s.frameElement&&n?w(s.frameElement):[]):e.concat(o,w(o,[],n))}n.d(e,{Dx:()=>m,Jj:()=>i,Kx:()=>w,Lw:()=>y,Ow:()=>v,Pf:()=>p,Py:()=>g,Re:()=>u,Ze:()=>f,Zq:()=>c,ao:()=>l,gQ:()=>d,hT:()=>h,kK:()=>s,tF:()=>o,wk:()=>r})},573662:(t,e,n)=>{"use strict";n.d(e,{Ct:()=>o,Fp:()=>s,GW:()=>c,Go:()=>x,I4:()=>v,JB:()=>O,KX:()=>A,NM:()=>u,Qq:()=>b,Rn:()=>y,VV:()=>a,Wh:()=>w,gy:()=>T,hp:()=>m,i8:()=>E,k3:()=>g,ku:()=>p,mA:()=>r,pw:()=>S,uZ:()=>d,yd:()=>_,ze:()=>l});const r=["top","right","bottom","left"],i=["start","end"],o=r.reduce(((t,e)=>t.concat(e,e+"-"+i[0],e+"-"+i[1])),[]),a=Math.min,s=Math.max,u=Math.round,c=Math.floor,l=t=>({x:t,y:t}),f={left:"right",right:"left",bottom:"top",top:"bottom"},h={start:"end",end:"start"};function d(t,e,n){return s(t,a(e,n))}function p(t,e){return"function"==typeof t?t(e):t}function g(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function v(t){return"y"===t?"height":"width"}function b(t){return["top","bottom"].includes(g(t))?"y":"x"}function w(t){return y(b(t))}function E(t,e,n){void 0===n&&(n=!1);const r=m(t),i=w(t),o=v(i);let a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=S(a)),[a,S(a)]}function T(t){const e=S(t);return[x(t),e,x(e)]}function x(t){return t.replace(/start|end/g,(t=>h[t]))}function A(t,e,n,r){const i=m(t);let o=function(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:a;default:return[]}}(g(t),"start"===n,r);return i&&(o=o.map((t=>t+"-"+i)),e&&(o=o.concat(o.map(x)))),o}function S(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function _(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function O(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}},300468:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;nf});var c=function(t){if(!t)return[];Array.isArray(t)||(t=[t]);for(var e={},n=0;n0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),u(this,f,{writable:!0,value:void 0}),u(this,h,{writable:!0,value:void 0}),u(this,d,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:void 0}),a(this,f,function(e){for(var n=c(e),r=0;r{"use strict";n.d(e,{en:()=>s});const r="one",i="two",o="few",a="other",s={cardinal:[r,a],ordinal:[r,i,o,a]}},150268:(t,e,n)=>{"use strict";n.d(e,{en:()=>r});const r=(t,e)=>{const n=String(t).split("."),r=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2);return e?1==o&&11!=a?"one":2==o&&12!=a?"two":3==o&&13!=a?"few":"other":1==t&&r?"one":"other"}},391850:(t,e,n)=>{"use strict";n.d(e,{en:()=>i});const r=(t,e)=>"other",i=r},240236:(t,e,n)=>{"use strict";n.d(e,{ZT:()=>i,_T:()=>a,ev:()=>u,gn:()=>s,pi:()=>o});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}Object.create;function u(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i